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

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

Issue 403083002: Allow EmbedRoot to be called multiple times. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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.cc
diff --git a/mojo/services/view_manager/root_node_manager.cc b/mojo/services/view_manager/root_node_manager.cc
index fe608e822fe27411cc13b40d83343c9a4f01060e..317dad23f16bcc07936923b2b6c4bb1203b90a81 100644
--- a/mojo/services/view_manager/root_node_manager.cc
+++ b/mojo/services/view_manager/root_node_manager.cc
@@ -88,8 +88,12 @@ void RootNodeManager::RemoveConnection(ViewManagerServiceImpl* connection) {
}
void RootNodeManager::EmbedRoot(const std::string& url) {
- CHECK(connection_map_.empty());
- EmbedImpl(kRootConnection, String::From(url), InvalidNodeId());
+ if (connection_map_.empty()) {
+ EmbedImpl(kRootConnection, String::From(url), InvalidNodeId());
+ return;
+ }
+ ViewManagerServiceImpl* connection = GetConnection(kWindowManagerConnection);
+ connection->client()->EmbedRoot(url);
}
void RootNodeManager::Embed(ConnectionSpecificId creator_id,
« no previous file with comments | « mojo/services/public/interfaces/view_manager/view_manager.mojom ('k') | mojo/services/view_manager/test_change_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698