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

Unified Diff: components/mus/ws/client_connection.h

Issue 1764483003: Changes ownership of ClientConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « components/mus/mus_app.cc ('k') | components/mus/ws/client_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/client_connection.h
diff --git a/components/mus/ws/client_connection.h b/components/mus/ws/client_connection.h
index b692b8d5a98e4a98ab910e11777295f8974aeed6..1d4f674338e7f8f488ae358962be62a8648c9765 100644
--- a/components/mus/ws/client_connection.h
+++ b/components/mus/ws/client_connection.h
@@ -17,24 +17,21 @@ class ConnectionManager;
class WindowTreeImpl;
// ClientConnection encapsulates the state needed for a single client connected
-// to the window manager.
+// to the window manager. ClientConnection is owned by the WindowTreeImpl the
+// ClientConnection is associated with.
class ClientConnection {
public:
- ClientConnection(scoped_ptr<WindowTreeImpl> service,
- mojom::WindowTreeClient* client);
+ explicit ClientConnection(mojom::WindowTreeClient* client);
virtual ~ClientConnection();
- WindowTreeImpl* service() { return service_.get(); }
- const WindowTreeImpl* service() const { return service_.get(); }
-
mojom::WindowTreeClient* client() { return client_; }
+ // Obtains a new WindowManager. This should only be called once.
virtual mojom::WindowManager* GetWindowManager() = 0;
virtual void SetIncomingMethodCallProcessingPaused(bool paused) = 0;
private:
- scoped_ptr<WindowTreeImpl> service_;
mojom::WindowTreeClient* client_;
DISALLOW_COPY_AND_ASSIGN(ClientConnection);
@@ -43,11 +40,11 @@ class ClientConnection {
// Bindings implementation of ClientConnection.
class DefaultClientConnection : public ClientConnection {
public:
- DefaultClientConnection(scoped_ptr<WindowTreeImpl> service_impl,
+ DefaultClientConnection(WindowTreeImpl* tree,
ConnectionManager* connection_manager,
mojom::WindowTreeRequest service_request,
mojom::WindowTreeClientPtr client);
- DefaultClientConnection(scoped_ptr<WindowTreeImpl> service_impl,
+ DefaultClientConnection(WindowTreeImpl* tree,
ConnectionManager* connection_manager,
mojom::WindowTreeClientPtr client);
~DefaultClientConnection() override;
« no previous file with comments | « components/mus/mus_app.cc ('k') | components/mus/ws/client_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698