Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1225)

Unified Diff: ash/aura/wm_shell_aura.cc

Issue 2267023003: ash: Eliminate PointerWatcherDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/aura/wm_shell_aura.h ('k') | ash/common/pointer_watcher_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/aura/wm_shell_aura.cc
diff --git a/ash/aura/wm_shell_aura.cc b/ash/aura/wm_shell_aura.cc
index 93eafbb6d733b217becb74adf9d027130195cc53..2129ba1dd4244c1d2eb6443429a765bd3937fbae 100644
--- a/ash/aura/wm_shell_aura.cc
+++ b/ash/aura/wm_shell_aura.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "ash/aura/pointer_watcher_adapter.h"
#include "ash/aura/wm_window_aura.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shell_delegate.h"
@@ -55,6 +56,12 @@ WmShellAura::~WmShellAura() {
WmShell::Set(nullptr);
}
+void WmShellAura::CreatePointerWatcherAdapter() {
+ // Must occur after Shell has installed its early pre-target handlers (for
+ // example, WindowModalityController).
+ pointer_watcher_adapter_.reset(new PointerWatcherAdapter);
+}
+
void WmShellAura::Shutdown() {
if (added_activation_observer_)
Shell::GetInstance()->activation_client()->RemoveObserver(this);
@@ -62,6 +69,8 @@ void WmShellAura::Shutdown() {
if (added_display_observer_)
Shell::GetInstance()->window_tree_host_manager()->RemoveObserver(this);
+ pointer_watcher_adapter_.reset();
+
WmShell::Shutdown();
}
@@ -248,11 +257,11 @@ void WmShellAura::RemoveDisplayObserver(WmDisplayObserver* observer) {
void WmShellAura::AddPointerWatcher(views::PointerWatcher* watcher,
bool wants_moves) {
- Shell::GetInstance()->AddPointerWatcher(watcher, wants_moves);
+ pointer_watcher_adapter_->AddPointerWatcher(watcher, wants_moves);
}
void WmShellAura::RemovePointerWatcher(views::PointerWatcher* watcher) {
- Shell::GetInstance()->RemovePointerWatcher(watcher);
+ pointer_watcher_adapter_->RemovePointerWatcher(watcher);
}
bool WmShellAura::IsTouchDown() {
« no previous file with comments | « ash/aura/wm_shell_aura.h ('k') | ash/common/pointer_watcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698