diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-24 20:39:58 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-24 20:39:58 +0000 |
commit | 56235c632f18380a4455b6ea113cd6e2a2df0d69 (patch) | |
tree | 82150c0c7f8bb6c2c80c5580c56c9772059aa92f /views/view.h | |
parent | 64b29caf448b26c316533dbd98efbdc92f6163bd (diff) | |
download | chromium_src-56235c632f18380a4455b6ea113cd6e2a2df0d69.zip chromium_src-56235c632f18380a4455b6ea113cd6e2a2df0d69.tar.gz chromium_src-56235c632f18380a4455b6ea113cd6e2a2df0d69.tar.bz2 |
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
Diffstat (limited to 'views/view.h')
-rw-r--r-- | views/view.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/views/view.h b/views/view.h index 4e6ace3..490662d 100644 --- a/views/view.h +++ b/views/view.h @@ -1093,14 +1093,12 @@ class View : public AcceleratorTarget { // Called when the UI theme has changed, overriding allows individual Views to // do special cleanup and processing (such as dropping resource caches). - // To dispatch a theme changed notification, call - // RootView::NotifyThemeChanged(). + // To dispatch a theme changed notification, call Widget::ThemeChanged(). virtual void OnThemeChanged() { } // Called when the locale has changed, overriding allows individual Views to // update locale-dependent strings. - // To dispatch a locale changed notification, call - // RootView::NotifyLocaleChanged(). + // To dispatch a locale changed notification, call Widget::LocaleChanged(). virtual void OnLocaleChanged() { } // Tooltips ------------------------------------------------------------------ |