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

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

Issue 396703002: Makes Embed() take a single node (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup 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
« no previous file with comments | « mojo/services/view_manager/root_node_manager.h ('k') | mojo/services/view_manager/test_change_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4da2184803849b21746a65212081f9126a7548d5..4da56aa339194b4b04e9fe73e7bca0471c1a2b80 100644
--- a/mojo/services/view_manager/root_node_manager.cc
+++ b/mojo/services/view_manager/root_node_manager.cc
@@ -92,15 +92,14 @@ void RootNodeManager::RemoveConnection(ViewManagerServiceImpl* connection) {
void RootNodeManager::EmbedRoot(const std::string& url) {
CHECK(connection_map_.empty());
- Array<Id> roots(0);
- EmbedImpl(kRootConnection, String::From(url), roots);
+ EmbedImpl(kRootConnection, String::From(url), InvalidNodeId());
}
void RootNodeManager::Embed(ConnectionSpecificId creator_id,
const String& url,
- const Array<Id>& node_ids) {
- CHECK_GT(node_ids.size(), 0u);
- EmbedImpl(creator_id, url, node_ids)->set_delete_on_connection_error();
+ Id transport_node_id) {
+ EmbedImpl(creator_id, url, NodeIdFromTransportId(transport_node_id))->
+ set_delete_on_connection_error();
}
ViewManagerServiceImpl* RootNodeManager::GetConnection(
@@ -240,7 +239,7 @@ void RootNodeManager::FinishChange() {
ViewManagerServiceImpl* RootNodeManager::EmbedImpl(
const ConnectionSpecificId creator_id,
const String& url,
- const Array<Id>& node_ids) {
+ const NodeId& root_id) {
MessagePipe pipe;
ServiceProvider* service_provider =
@@ -258,8 +257,8 @@ ViewManagerServiceImpl* RootNodeManager::EmbedImpl(
new ViewManagerServiceImpl(this,
creator_id,
creator_url,
- url.To<std::string>());
- connection->SetRoots(node_ids);
+ url.To<std::string>(),
+ root_id);
BindToPipe(connection, pipe.handle0.Pass());
connections_created_by_connect_.insert(connection);
return connection;
« no previous file with comments | « mojo/services/view_manager/root_node_manager.h ('k') | mojo/services/view_manager/test_change_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698