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

Unified Diff: ash/mus/window_manager.cc

Issue 2235363003: Wires up WmShellMus::Add/RemovePointerWatcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pointer_watcher_capture
Patch Set: merge to tot again 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/mus/window_manager.h ('k') | ash/pointer_watcher_delegate_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager.cc
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
index da15fa8e446c12d75c9d5ca818daf2ee9bb2473e..ed46d9e254ced7584ed7000fc920d367335b4045 100644
--- a/ash/mus/window_manager.cc
+++ b/ash/mus/window_manager.cc
@@ -33,6 +33,7 @@
#include "ui/app_list/presenter/app_list_presenter.h"
#include "ui/base/hit_test.h"
#include "ui/events/mojo/event.mojom.h"
+#include "ui/views/mus/pointer_watcher_event_router.h"
#include "ui/views/mus/screen_mus.h"
namespace ash {
@@ -77,6 +78,9 @@ void WindowManager::Init(ui::WindowTreeClient* window_tree_client) {
DCHECK(!window_tree_client_);
window_tree_client_ = window_tree_client;
+ pointer_watcher_event_router_.reset(
+ new views::PointerWatcherEventRouter(window_tree_client));
+
shadow_controller_.reset(new ShadowController(window_tree_client));
// The insets are roughly what is needed by CustomFrameView. The expectation
@@ -95,7 +99,8 @@ void WindowManager::Init(ui::WindowTreeClient* window_tree_client) {
std::unique_ptr<ShellDelegate> shell_delegate(new ShellDelegateMus(
base::MakeUnique<AppListPresenterStub>(), connector_));
- shell_.reset(new WmShellMus(std::move(shell_delegate), this));
+ shell_.reset(new WmShellMus(std::move(shell_delegate), this,
+ pointer_watcher_event_router_.get()));
shell_->Initialize();
lookup_.reset(new WmLookupMus);
}
@@ -216,13 +221,15 @@ void WindowManager::OnDidDestroyClient(ui::WindowTreeClient* client) {
FOR_EACH_OBSERVER(WindowManagerObserver, observers_,
OnWindowTreeClientDestroyed());
+ pointer_watcher_event_router_.reset();
+
window_tree_client_ = nullptr;
window_manager_client_ = nullptr;
}
void WindowManager::OnPointerEventObserved(const ui::PointerEvent& event,
ui::Window* target) {
- // Does not use PointerWatchers.
+ pointer_watcher_event_router_->OnPointerEventObserved(event, target);
}
void WindowManager::SetWindowManagerClient(ui::WindowManagerClient* client) {
« no previous file with comments | « ash/mus/window_manager.h ('k') | ash/pointer_watcher_delegate_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698