summaryrefslogtreecommitdiffstats
path: root/mojo/services/view_manager/view_manager_init_service_impl.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-19 05:16:52 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-19 05:16:52 +0000
commit2809e927094c8010513b08fad93a3c606fa40ba2 (patch)
tree2699d0758442e98abeeafabbe8b6747ca4c08134 /mojo/services/view_manager/view_manager_init_service_impl.cc
parentda371737a7c86c7ae60ad6be1d8342e25073e828 (diff)
downloadchromium_src-2809e927094c8010513b08fad93a3c606fa40ba2.zip
chromium_src-2809e927094c8010513b08fad93a3c606fa40ba2.tar.gz
chromium_src-2809e927094c8010513b08fad93a3c606fa40ba2.tar.bz2
Allow EmbedRoot to be called multiple times.
Subsequent calls to EmbedRoot are now delegated to the window manager. This allows an application that was not created via the embed flow to obtain a connection to the view manager by asking the view manager init service to embed it somewhere. The init service just forwards this to the window manager. This is effectively like asking the window manager to create a toplevel window. R=sky@chromium.org BUG=none Review URL: https://codereview.chromium.org/403083002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284322 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/services/view_manager/view_manager_init_service_impl.cc')
-rw-r--r--mojo/services/view_manager/view_manager_init_service_impl.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/mojo/services/view_manager/view_manager_init_service_impl.cc b/mojo/services/view_manager/view_manager_init_service_impl.cc
index f7822fc..0a1c024 100644
--- a/mojo/services/view_manager/view_manager_init_service_impl.cc
+++ b/mojo/services/view_manager/view_manager_init_service_impl.cc
@@ -44,11 +44,8 @@ void ViewManagerInitServiceImpl::MaybeEmbedRoot(
void ViewManagerInitServiceImpl::EmbedRoot(
const String& url,
const Callback<void(bool)>& callback) {
- if (connect_params_) {
- DVLOG(1) << "Ignoring second connect";
- callback.Run(false);
- return;
- }
+ // TODO(beng): This means you can only have one EmbedRoot in flight at a time.
+ // Keep a vector of these around instead.
connect_params_.reset(new ConnectParams);
connect_params_->url = url.To<std::string>();
connect_params_->callback = callback;