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

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

Issue 2026623002: views/mus: Have explicit ownership of views::WindowManagerConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 4 years, 6 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/views_mus_test_suite.cc ('k') | ui/views/mus/window_manager_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/window_manager_connection.h
diff --git a/ui/views/mus/window_manager_connection.h b/ui/views/mus/window_manager_connection.h
index afcf368ab5653a8bafe7f8c9f834ede401a1f1fc..7bf3bfa7bd78b057e92ccf57d4b9dbe67f3ee7d9 100644
--- a/ui/views/mus/window_manager_connection.h
+++ b/ui/views/mus/window_manager_connection.h
@@ -41,13 +41,13 @@ class VIEWS_MUS_EXPORT WindowManagerConnection
: public NON_EXPORTED_BASE(mus::WindowTreeClientDelegate),
public ScreenMusDelegate {
public:
- static void Create(shell::Connector* connector,
- const shell::Identity& identity);
+ static std::unique_ptr<WindowManagerConnection> Create(
+ shell::Connector* connector,
+ const shell::Identity& identity);
static WindowManagerConnection* Get();
static bool Exists();
- // Destroys the singleton instance.
- static void Reset();
+ ~WindowManagerConnection() override;
shell::Connector* connector() { return connector_; }
@@ -67,7 +67,6 @@ class VIEWS_MUS_EXPORT WindowManagerConnection
WindowManagerConnection(shell::Connector* connector,
const shell::Identity& identity);
- ~WindowManagerConnection() override;
// Returns true if there is one or more pointer watchers for this client.
bool HasPointerWatcher();
« no previous file with comments | « ui/views/mus/views_mus_test_suite.cc ('k') | ui/views/mus/window_manager_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698