diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-05 18:59:03 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-05 18:59:03 +0000 |
commit | 2d6eb74a95f9aa8edb777edc03e6915354bdd96f (patch) | |
tree | 4aa3c19921720fb0ff020335128f9ce46c956fde /apps | |
parent | d0b28895943cb6ac3a37920268ac93347b81b1c9 (diff) | |
download | chromium_src-2d6eb74a95f9aa8edb777edc03e6915354bdd96f.zip chromium_src-2d6eb74a95f9aa8edb777edc03e6915354bdd96f.tar.gz chromium_src-2d6eb74a95f9aa8edb777edc03e6915354bdd96f.tar.bz2 |
Rename RootWindowObserver -> WindowTreeHostObserver.
Move observer management and notification to WTH.
R=sky@chromium.org
http://crbug.com/348874
Review URL: https://codereview.chromium.org/186423002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255108 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r-- | apps/shell/browser/shell_browser_main_parts.cc | 17 | ||||
-rw-r--r-- | apps/shell/browser/shell_browser_main_parts.h | 9 |
2 files changed, 13 insertions, 13 deletions
diff --git a/apps/shell/browser/shell_browser_main_parts.cc b/apps/shell/browser/shell_browser_main_parts.cc index 05cb0e7..559c3c9 100644 --- a/apps/shell/browser/shell_browser_main_parts.cc +++ b/apps/shell/browser/shell_browser_main_parts.cc @@ -24,6 +24,7 @@ #include "ui/aura/env.h" #include "ui/aura/test/test_screen.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/aura/window_tree_host.h" #include "ui/base/ime/input_method_initializer.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/screen.h" @@ -140,7 +141,7 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() { // TODO(jamescook): For demo purposes create a window with a WebView just // to ensure that the content module is properly initialized. webview_window_.reset(CreateWebViewWindow(browser_context_.get(), - wm_test_helper_->dispatcher()->window())); + wm_test_helper_->host()->window())); webview_window_->Show(); } } @@ -164,8 +165,8 @@ void ShellBrowserMainParts::PostMainMessageLoopRun() { aura::Env::DeleteInstance(); } -void ShellBrowserMainParts::OnWindowTreeHostCloseRequested( - const aura::WindowEventDispatcher* dispatcher) { +void ShellBrowserMainParts::OnHostCloseRequested( + const aura::WindowTreeHost* host) { extension_system_->CloseApp(); base::MessageLoop::current()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure()); @@ -180,17 +181,17 @@ void ShellBrowserMainParts::CreateRootWindow() { // Set up basic pieces of views::corewm. wm_test_helper_.reset(new wm::WMTestHelper(gfx::Size(800, 600))); // Ensure the X window gets mapped. - wm_test_helper_->dispatcher()->host()->Show(); + wm_test_helper_->host()->Show(); // Watch for the user clicking the close box. - wm_test_helper_->dispatcher()->AddRootWindowObserver(this); + wm_test_helper_->host()->AddObserver(this); } void ShellBrowserMainParts::DestroyRootWindow() { // We should close widget before destroying root window. webview_window_.reset(); devtools_delegate_->Stop(); - wm_test_helper_->dispatcher()->RemoveRootWindowObserver(this); - wm_test_helper_->dispatcher()->PrepareForShutdown(); + wm_test_helper_->host()->RemoveObserver(this); + wm_test_helper_->host()->dispatcher()->PrepareForShutdown(); wm_test_helper_.reset(); ui::ShutdownInputMethodForTesting(); } @@ -198,7 +199,7 @@ void ShellBrowserMainParts::DestroyRootWindow() { void ShellBrowserMainParts::CreateViewsDelegate() { DCHECK(!views::ViewsDelegate::views_delegate); views::ViewsDelegate::views_delegate = - new ShellViewsDelegate(wm_test_helper_->dispatcher()->window()); + new ShellViewsDelegate(wm_test_helper_->host()->window()); } void ShellBrowserMainParts::DestroyViewsDelegate() { diff --git a/apps/shell/browser/shell_browser_main_parts.h b/apps/shell/browser/shell_browser_main_parts.h index d8746d8..fb40160e 100644 --- a/apps/shell/browser/shell_browser_main_parts.h +++ b/apps/shell/browser/shell_browser_main_parts.h @@ -9,7 +9,7 @@ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" #include "content/public/browser/browser_main_parts.h" -#include "ui/aura/root_window_observer.h" +#include "ui/aura/window_tree_host_observer.h" namespace aura { class TestScreen; @@ -46,7 +46,7 @@ class ShellExtensionsClient; // Handles initialization of AppShell. class ShellBrowserMainParts : public content::BrowserMainParts, - public aura::RootWindowObserver { + public aura::WindowTreeHostObserver { public: explicit ShellBrowserMainParts( const content::MainFunctionParams& parameters); @@ -69,9 +69,8 @@ class ShellBrowserMainParts : public content::BrowserMainParts, virtual bool MainMessageLoopRun(int* result_code) OVERRIDE; virtual void PostMainMessageLoopRun() OVERRIDE; - // aura::RootWindowObserver overrides: - virtual void OnWindowTreeHostCloseRequested( - const aura::WindowEventDispatcher* dispatcher) OVERRIDE; + // aura::WindowTreeHostObserver overrides: + virtual void OnHostCloseRequested(const aura::WindowTreeHost* host) OVERRIDE; private: // Creates the window that hosts the apps. |