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

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

Issue 397803003: Makes it so a node can only the root of one connection at a time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge again Created 6 years, 5 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/root_node_manager.h
diff --git a/mojo/services/view_manager/root_node_manager.h b/mojo/services/view_manager/root_node_manager.h
index 62932abf2e607b30f371fcfc5f16ed62b06f8ffe..0b20fdc3fddc52b15616451634bf23a17aa1bfe0 100644
--- a/mojo/services/view_manager/root_node_manager.h
+++ b/mojo/services/view_manager/root_node_manager.h
@@ -69,6 +69,10 @@ class MOJO_VIEW_MANAGER_EXPORT RootNodeManager
return message_ids_.count(connection_id) > 0;
}
+ // Sends OnServerChangeIdAdvanced() to all connections that have not yet
+ // been messaged.
+ void SendServerChangeIdAdvanced();
+
private:
RootNodeManager* root_;
const ConnectionSpecificId connection_id_;
@@ -133,6 +137,9 @@ class MOJO_VIEW_MANAGER_EXPORT RootNodeManager
ConnectionSpecificId creator_id,
const std::string& url) const;
+ // Returns the ViewManagerServiceImpl that has |id| as a root.
+ ViewManagerServiceImpl* GetConnectionWithRoot(const NodeId& id);
+
void DispatchViewInputEventToWindowManager(const View* view,
const ui::Event* event);
@@ -178,6 +185,9 @@ class MOJO_VIEW_MANAGER_EXPORT RootNodeManager
// Balances a call to PrepareForChange().
void FinishChange();
+ // See description in ScopedChange.
+ void SendServerChangeIdAdvanced();
+
// Returns true if the specified connection originated the current change.
bool IsChangeSource(ConnectionSpecificId connection_id) const {
return current_change_ && current_change_->connection_id() == connection_id;
« no previous file with comments | « mojo/services/public/interfaces/view_manager/view_manager.mojom ('k') | mojo/services/view_manager/root_node_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698