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

Unified Diff: ui/views/mus/pointer_watcher_event_router.cc

Issue 2247503002: mash: Create and show a shelf in mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix WindowManager WmShell::Shutdown; delay PointerWatcherEventRouter teardown; cleanup shutdown wor… 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 | « ui/views/mus/pointer_watcher_event_router.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/pointer_watcher_event_router.cc
diff --git a/ui/views/mus/pointer_watcher_event_router.cc b/ui/views/mus/pointer_watcher_event_router.cc
index 3df701579b6ce89e4688bff55b72f7b8b1e9aa15..3696acb569d9790f9d252922d373c733633ee23d 100644
--- a/ui/views/mus/pointer_watcher_event_router.cc
+++ b/ui/views/mus/pointer_watcher_event_router.cc
@@ -44,6 +44,7 @@ void PointerWatcherEventRouter::AddPointerWatcher(PointerWatcher* watcher,
}
void PointerWatcherEventRouter::RemovePointerWatcher(PointerWatcher* watcher) {
+ DCHECK(pointer_watchers_.HasObserver(watcher));
James Cook 2016/08/17 18:31:50 FYI - We'll have to see how this goes. I vaguely r
msw 2016/08/17 18:55:17 Acknowledged.
pointer_watchers_.RemoveObserver(watcher);
if (!HasPointerWatcher()) {
// Last PointerWatcher removed, stop the watcher on the window server.
@@ -87,8 +88,9 @@ void PointerWatcherEventRouter::OnWindowTreeCaptureChanged(
FOR_EACH_OBSERVER(PointerWatcher, pointer_watchers_, OnMouseCaptureChanged());
}
-void PointerWatcherEventRouter::OnWillDestroyClient(
+void PointerWatcherEventRouter::OnDidDestroyClient(
ui::WindowTreeClient* client) {
+ DCHECK(!pointer_watchers_.might_have_observers());
sky 2016/08/17 19:50:36 I suspect we'll have to remove this, but we can tr
DCHECK_EQ(client, window_tree_client_);
window_tree_client_->RemoveObserver(this);
window_tree_client_ = nullptr;
« no previous file with comments | « ui/views/mus/pointer_watcher_event_router.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698