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

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

Issue 272833002: View synchronization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/root_node_manager.cc
diff --git a/mojo/services/view_manager/root_node_manager.cc b/mojo/services/view_manager/root_node_manager.cc
index 6517b326c99e4bd68b1d6cd81384f946ef34efea..6d175533761b69f15d9ac44771ad69592c4ffc85 100644
--- a/mojo/services/view_manager/root_node_manager.cc
+++ b/mojo/services/view_manager/root_node_manager.cc
@@ -109,6 +109,7 @@ void RootNodeManager::NotifyNodeViewReplaced(const NodeId& node,
}
void RootNodeManager::NotifyNodeDeleted(const NodeId& node) {
+ // TODO(sky): make a macro for this.
for (ConnectionMap::iterator i = connection_map_.begin();
i != connection_map_.end(); ++i) {
const TransportChangeId change_id =
@@ -118,6 +119,17 @@ void RootNodeManager::NotifyNodeDeleted(const NodeId& node) {
}
}
+void RootNodeManager::NotifyViewDeleted(const ViewId& view) {
+ // TODO(sky): make a macro for this.
+ for (ConnectionMap::iterator i = connection_map_.begin();
+ i != connection_map_.end(); ++i) {
+ const TransportChangeId change_id =
+ (change_ && i->first == change_->connection_id) ?
+ change_->change_id : 0;
+ i->second->NotifyViewDeleted(view, change_id);
+ }
+}
+
void RootNodeManager::PrepareForChange(ViewManagerConnection* connection,
TransportChangeId change_id) {
DCHECK(!change_.get()); // Should only ever have one change in flight.

Powered by Google App Engine
This is Rietveld 408576698