| Index: mojo/services/view_manager/view_manager_service_impl.cc
|
| diff --git a/mojo/services/view_manager/view_manager_service_impl.cc b/mojo/services/view_manager/view_manager_service_impl.cc
|
| index ee2c795001ded8b944f3c016b77010483627373c..96cf1021eabcee262b2b57231782b32b16d08949 100644
|
| --- a/mojo/services/view_manager/view_manager_service_impl.cc
|
| +++ b/mojo/services/view_manager/view_manager_service_impl.cc
|
| @@ -726,6 +726,11 @@ void ViewManagerServiceImpl::SetNodeVisibility(
|
| void ViewManagerServiceImpl::Embed(const String& url,
|
| Id transport_node_id,
|
| const Callback<void(bool)>& callback) {
|
| + if (NodeIdFromTransportId(transport_node_id) == InvalidNodeId()) {
|
| + root_node_manager_->EmbedRoot(url);
|
| + callback.Run(true);
|
| + return;
|
| + }
|
| bool success = CanEmbed(transport_node_id);
|
| if (success) {
|
| // Only allow a node to be the root for one connection.
|
|
|