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

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

Issue 2301353003: Changes ownership of WindowTreeClient (Closed)
Patch Set: fix navigation Created 4 years, 3 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/window_manager_connection.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/window_manager_connection.cc
diff --git a/ui/views/mus/window_manager_connection.cc b/ui/views/mus/window_manager_connection.cc
index bfa45230e7d99218d36a55163e4bba8e5a59c273..7b30672750b3c9825fa49f30e12404f5140dc35b 100644
--- a/ui/views/mus/window_manager_connection.cc
+++ b/ui/views/mus/window_manager_connection.cc
@@ -140,12 +140,15 @@ WindowManagerConnection::WindowManagerConnection(
void WindowManagerConnection::OnEmbed(ui::Window* root) {}
-void WindowManagerConnection::OnDidDestroyClient(ui::WindowTreeClient* client) {
- if (client_.get() == client) {
- client_.release();
- } else {
- DCHECK(!client_);
- }
+void WindowManagerConnection::OnLostConnection(ui::WindowTreeClient* client) {
+ DCHECK_EQ(client, client_.get());
+ client_.reset();
+}
+
+void WindowManagerConnection::OnEmbedRootDestroyed(ui::Window* root) {
+ // Not called for WindowManagerConnection as WindowTreeClient isn't created by
+ // way of an Embed().
+ NOTREACHED();
}
void WindowManagerConnection::OnPointerEventObserved(
« no previous file with comments | « ui/views/mus/window_manager_connection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698