summaryrefslogtreecommitdiffstats
path: root/ui/views/view.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-21 19:14:16 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-21 19:14:16 +0000
commit4cd97edd0b3362c5e16a17ed9988279b2273b9ef (patch)
tree41a5136c95a98f2ed1e9d8a117774c3deb4faf07 /ui/views/view.cc
parentb4f7002bf914c1f13856b2d545edc5ff400321a3 (diff)
downloadchromium_src-4cd97edd0b3362c5e16a17ed9988279b2273b9ef.zip
chromium_src-4cd97edd0b3362c5e16a17ed9988279b2273b9ef.tar.gz
chromium_src-4cd97edd0b3362c5e16a17ed9988279b2273b9ef.tar.bz2
retry r258394
requestAutocomplete -- accept arbitrarily long street addresses This only fixes views. Mac will need to be updated as well (this change introduces ifdefs to leave the mac on its current behavior). BUG=335733 R=groby@chromium.org, sky@chromium.org Review URL: https://codereview.chromium.org/206473007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258643 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/view.cc')
-rw-r--r--ui/views/view.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/views/view.cc b/ui/views/view.cc
index 5875c7c..02b5603 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -590,14 +590,19 @@ const char* View::GetClassName() const {
return kViewClassName;
}
-View* View::GetAncestorWithClassName(const std::string& name) {
- for (View* view = this; view; view = view->parent_) {
+const View* View::GetAncestorWithClassName(const std::string& name) const {
+ for (const View* view = this; view; view = view->parent_) {
if (!strcmp(view->GetClassName(), name.c_str()))
return view;
}
return NULL;
}
+View* View::GetAncestorWithClassName(const std::string& name) {
+ return const_cast<View*>(const_cast<const View*>(this)->
+ GetAncestorWithClassName(name));
+}
+
const View* View::GetViewByID(int id) const {
if (id == id_)
return const_cast<View*>(this);