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

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

Issue 323413003: Makes the view manager notify the client of new roots correctly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « no previous file | mojo/services/view_manager/view_manager_connection_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/view_manager_connection.cc
diff --git a/mojo/services/view_manager/view_manager_connection.cc b/mojo/services/view_manager/view_manager_connection.cc
index 8d4d0a6438ec31f1a7336fed2ddfdb1d7ab66464..104baf9fc4bff12d2ecc4491648dc47280fa8cd0 100644
--- a/mojo/services/view_manager/view_manager_connection.cc
+++ b/mojo/services/view_manager/view_manager_connection.cc
@@ -389,10 +389,14 @@ bool ViewManagerConnection::AddRoots(
did_add_root = true;
roots_.insert(node_ids[i]);
+ Node* node = GetNode(NodeIdFromTransportId(node_ids[i]));
+ DCHECK(node);
if (known_nodes_.count(node_ids[i]) == 0) {
- Node* node = GetNode(NodeIdFromTransportId(node_ids[i]));
- DCHECK(node);
GetUnknownNodesFrom(node, &to_send);
+ } else {
+ // Even though the connection knows about the new root we need to tell it
+ // |node| is now a root.
+ to_send.push_back(node);
}
}
« no previous file with comments | « no previous file | mojo/services/view_manager/view_manager_connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698