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

Unified Diff: components/mus/ws/connection_manager.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/ws/client_connection.cc ('k') | components/mus/ws/connection_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/connection_manager.h
diff --git a/components/mus/ws/connection_manager.h b/components/mus/ws/connection_manager.h
index b48386742f50c320a2be8fdefce143813d1a7ae6..a25e4562d28a9a4603cd1f3a1148c150af05c38c 100644
--- a/components/mus/ws/connection_manager.h
+++ b/components/mus/ws/connection_manager.h
@@ -88,20 +88,23 @@ class ConnectionManager : public ServerWindowDelegate,
// Returns the id for the next WindowTreeHostImpl.
uint16_t GetAndAdvanceNextHostId();
- // Invoked when a WindowTreeImpl's connection encounters an error.
- void OnConnectionError(ClientConnection* connection);
-
- ClientConnection* GetClientConnection(WindowTreeImpl* window_tree);
-
// See description of WindowTree::Embed() for details. This assumes
// |transport_window_id| is valid.
WindowTreeImpl* EmbedAtWindow(ServerWindow* root,
uint32_t policy_bitmask,
mojom::WindowTreeClientPtr client);
- // Adds |connection| to internal maps.
- void AddConnection(scoped_ptr<ClientConnection> owned_connection,
- mojom::WindowTreePtr tree_ptr);
+ // Adds |tree_impl_ptr| to the set of known trees. Use DestroyTree() to
+ // destroy the tree.
+ WindowTreeImpl* AddTree(scoped_ptr<WindowTreeImpl> tree_impl_ptr,
+ scoped_ptr<ClientConnection> connection,
+ mojom::WindowTreePtr tree_ptr);
+ WindowTreeImpl* CreateTreeForWindowManager(
+ WindowTreeHostImpl* host,
+ mojom::WindowManagerFactory* factory,
+ ServerWindow* root);
+ // Invoked when a WindowTreeImpl's connection encounters an error.
+ void DestroyTree(WindowTreeImpl* tree);
// Returns the connection by id.
WindowTreeImpl* GetConnection(ConnectionSpecificId connection_id);
@@ -220,7 +223,8 @@ class ConnectionManager : public ServerWindowDelegate,
private:
friend class Operation;
- using ConnectionMap = std::map<ConnectionSpecificId, ClientConnection*>;
+ using WindowTreeMap =
+ std::map<ConnectionSpecificId, scoped_ptr<WindowTreeImpl>>;
using HostConnectionMap =
std::map<WindowTreeHostImpl*, WindowTreeHostConnection*>;
@@ -323,7 +327,7 @@ class ConnectionManager : public ServerWindowDelegate,
uint16_t next_host_id_;
// Set of WindowTreeImpls.
- ConnectionMap connection_map_;
+ WindowTreeMap tree_map_;
// WindowTreeHostImpls are initially added to |pending_hosts_|. When the
// display is initialized it is moved to |hosts_|.
« no previous file with comments | « components/mus/ws/client_connection.cc ('k') | components/mus/ws/connection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698