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

Unified Diff: mojo/services/view_manager/view_manager_connection.h

Issue 308803002: Change type of interface created by mojo:view_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 7 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
Index: mojo/services/view_manager/view_manager_connection.h
diff --git a/mojo/services/view_manager/view_manager_connection.h b/mojo/services/view_manager/view_manager_connection.h
index d463694e6844dc67c10135d703fccab92a4d32af..5b3d985aa9b623171a63192386501f758286628a 100644
--- a/mojo/services/view_manager/view_manager_connection.h
+++ b/mojo/services/view_manager/view_manager_connection.h
@@ -43,6 +43,10 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
explicit ViewManagerConnection(RootNodeManager* root_node_manager);
virtual ~ViewManagerConnection();
+ // Used to mark this connection as originating from a call to
+ // IViewManager::Connect(). When set OnConnectionError() deletes |this|.
+ void set_delete_on_connection_error() { delete_on_connection_error_ = true; }
+
TransportConnectionId id() const { return id_; }
// Returns the Node with the specified id.
@@ -185,9 +189,8 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
RootNodeManager* root_node_manager_;
- // Id of this connection as assigned by RootNodeManager. Assigned in
- // OnConnectionEstablished().
- TransportConnectionId id_;
+ // Id of this connection as assigned by RootNodeManager.
+ const TransportConnectionId id_;
NodeMap node_map_;
@@ -204,6 +207,9 @@ class MOJO_VIEW_MANAGER_EXPORT ViewManagerConnection
// invalid node is added here to ensure this connection is still constrained.
NodeIdSet roots_;
+ // See description above setter.
+ bool delete_on_connection_error_;
+
DISALLOW_COPY_AND_ASSIGN(ViewManagerConnection);
};
« no previous file with comments | « mojo/services/view_manager/root_view_manager_delegate.h ('k') | mojo/services/view_manager/view_manager_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698