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

Unified Diff: ash/mus/window_manager.h

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 | « ash/mus/test/wm_test_helper.cc ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager.h
diff --git a/ash/mus/window_manager.h b/ash/mus/window_manager.h
index 67ea7ca4d048a0f56241c4f3e56616ca6825be8d..7f4e5ac23c150fcb40a0a297b705555ddbc109a2 100644
--- a/ash/mus/window_manager.h
+++ b/ash/mus/window_manager.h
@@ -53,11 +53,13 @@ class WindowManager : public ui::WindowManagerDelegate,
explicit WindowManager(shell::Connector* connector);
~WindowManager() override;
- void Init(ui::WindowTreeClient* window_tree_client);
+ void Init(std::unique_ptr<ui::WindowTreeClient> window_tree_client);
WmShellMus* shell() { return shell_.get(); }
- ui::WindowTreeClient* window_tree_client() { return window_tree_client_; }
+ ui::WindowTreeClient* window_tree_client() {
+ return window_tree_client_.get();
+ }
ui::WindowManagerClient* window_manager_client() {
return window_manager_client_;
@@ -90,13 +92,16 @@ class WindowManager : public ui::WindowManagerDelegate,
ui::Window* window,
const display::Display& display);
+ void Shutdown();
+
// ui::WindowObserver:
void OnWindowDestroying(ui::Window* window) override;
void OnWindowDestroyed(ui::Window* window) override;
// WindowTreeClientDelegate:
void OnEmbed(ui::Window* root) override;
- void OnDidDestroyClient(ui::WindowTreeClient* client) override;
+ void OnEmbedRootDestroyed(ui::Window* root) override;
+ void OnLostConnection(ui::WindowTreeClient* client) override;
void OnPointerEventObserved(const ui::PointerEvent& event,
ui::Window* target) override;
@@ -123,7 +128,7 @@ class WindowManager : public ui::WindowManagerDelegate,
shell::Connector* connector_;
- ui::WindowTreeClient* window_tree_client_ = nullptr;
+ std::unique_ptr<ui::WindowTreeClient> window_tree_client_;
ui::WindowManagerClient* window_manager_client_ = nullptr;
« no previous file with comments | « ash/mus/test/wm_test_helper.cc ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698