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

Unified Diff: mojo/services/view_manager/view_manager_init_service_impl.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/view_manager_init_service_impl.cc
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 f7822fc0d3b5f6ec9e773b187235758260ae4f3d..0a1c0249fd6fad35c2f31e7d7b40baec2d59cbee 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;
« no previous file with comments | « mojo/services/view_manager/test_change_tracker.cc ('k') | mojo/services/view_manager/view_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698