From 56235c632f18380a4455b6ea113cd6e2a2df0d69 Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Thu, 24 Feb 2011 20:39:58 +0000 Subject: Move some more direct uses of RootView to Widget. The idea is to remove RootView from the public API of Views and eventually move it into the internal namespace. It is really an implementation detail of event propagation into a view hierarchy. Anyone that calls GetRootView() and does something that isn't a View method should be calling that method on the Widget instead... e.g. instead of calling GetRootView()->NotifyThemeChanged(), call GetWidget()->ThemeChanged(). The RootView is a focus traversable, which is fine, but calling code should call GetWidget()->GetFocusTraversable() to obtain it, rather than knowing RootView is-a focus traversable and just calling GetRootView(). This also changes FocusManager::ContainsView to be simpler and cross platform. Since there is one FocusManager per view hierarchy (attached to the toplevel Widget), getting the view's focus manager and comparing it to the current focus manager is a sufficient test. BUG=72040 TEST=existing unittests, none Review URL: http://codereview.chromium.org/6577017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75940 0039d316-1c4b-4281-b951-d872f2087c98 --- views/widget/widget_gtk.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'views/widget/widget_gtk.h') diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h index 2b8822a..a75f586 100644 --- a/views/widget/widget_gtk.h +++ b/views/widget/widget_gtk.h @@ -199,6 +199,9 @@ class WidgetGtk virtual View* GetDraggedView(); virtual void SchedulePaintInRect(const gfx::Rect& rect); virtual void SetCursor(gfx::NativeCursor cursor); + virtual FocusTraversable* GetFocusTraversable(); + virtual void ThemeChanged(); + virtual void LocaleChanged(); // Overridden from FocusTraversable: virtual FocusSearch* GetFocusSearch(); -- cgit v1.1