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/window | |
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/window')
-rw-r--r-- | views/window/non_client_view.cc | 2 | ||||
-rw-r--r-- | views/window/window_gtk.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/views/window/non_client_view.cc b/views/window/non_client_view.cc index c31dda6..a3412ce 100644 --- a/views/window/non_client_view.cc +++ b/views/window/non_client_view.cc @@ -58,7 +58,7 @@ void NonClientView::WindowClosing() { void NonClientView::UpdateFrame() { SetFrameView(frame_->CreateFrameViewForWindow()); - GetRootView()->NotifyThemeChanged(); + GetWidget()->ThemeChanged(); Layout(); SchedulePaint(); frame_->UpdateFrameAfterFrameChange(); diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc index e933e98..09e1984 100644 --- a/views/window/window_gtk.cc +++ b/views/window/window_gtk.cc @@ -263,7 +263,7 @@ bool WindowGtk::ShouldUseNativeFrame() const { void WindowGtk::FrameTypeChanged() { // This is called when the Theme has changed, so forward the event to the root // widget. - GetRootView()->NotifyThemeChanged(); + ThemeChanged(); } //////////////////////////////////////////////////////////////////////////////// |