| Index: mojo/services/view_manager/view_manager_init_service_context.cc
|
| diff --git a/mojo/services/view_manager/view_manager_init_service_context.cc b/mojo/services/view_manager/view_manager_init_service_context.cc
|
| index 99e40fca15ea056a3ca280f596038d47b5dfa1c3..79a7067bf13213897c1ed29513851d6b9f803432 100644
|
| --- a/mojo/services/view_manager/view_manager_init_service_context.cc
|
| +++ b/mojo/services/view_manager/view_manager_init_service_context.cc
|
| @@ -17,8 +17,8 @@ ViewManagerInitServiceContext::ConnectParams::ConnectParams() {}
|
| ViewManagerInitServiceContext::ConnectParams::~ConnectParams() {}
|
|
|
| ViewManagerInitServiceContext::ViewManagerInitServiceContext()
|
| - : is_tree_host_ready_(false),
|
| - deleting_connection_(false) {}
|
| + : deleting_connection_(false) {
|
| +}
|
| ViewManagerInitServiceContext::~ViewManagerInitServiceContext() {}
|
|
|
| void ViewManagerInitServiceContext::AddConnection(
|
| @@ -49,7 +49,6 @@ void ViewManagerInitServiceContext::ConfigureIncomingConnection(
|
| if (!connection_manager_.get()) {
|
| connection_manager_.reset(new ConnectionManager(
|
| connection,
|
| - this,
|
| base::Bind(&ViewManagerInitServiceContext::OnNativeViewportDeleted,
|
| base::Unretained(this))));
|
| }
|
| @@ -59,18 +58,8 @@ void ViewManagerInitServiceContext::Embed(
|
| const String& url,
|
| ServiceProviderPtr service_provider,
|
| const Callback<void(bool)>& callback) {
|
| - ConnectParams* params = new ConnectParams;
|
| - params->url = url.To<std::string>();
|
| - params->callback = callback;
|
| - params->service_provider.Bind(service_provider.PassMessagePipe());
|
| - connect_params_.push_back(params);
|
| - MaybeEmbed();
|
| -}
|
| -
|
| -void ViewManagerInitServiceContext::OnDisplayManagerWindowTreeHostCreated() {
|
| - DCHECK(!is_tree_host_ready_);
|
| - is_tree_host_ready_ = true;
|
| - MaybeEmbed();
|
| + connection_manager_->EmbedRoot(url, Get(&service_provider));
|
| + callback.Run(true);
|
| }
|
|
|
| void ViewManagerInitServiceContext::OnNativeViewportDeleted() {
|
| @@ -85,17 +74,5 @@ void ViewManagerInitServiceContext::OnNativeViewportDeleted() {
|
| connection_manager_.reset();
|
| }
|
|
|
| -void ViewManagerInitServiceContext::MaybeEmbed() {
|
| - if (!is_tree_host_ready_)
|
| - return;
|
| -
|
| - for (ScopedVector<ConnectParams>::const_iterator it = connect_params_.begin();
|
| - it != connect_params_.end(); ++it) {
|
| - connection_manager_->EmbedRoot((*it)->url, (*it)->service_provider.Pass());
|
| - (*it)->callback.Run(true);
|
| - }
|
| - connect_params_.clear();
|
| -}
|
| -
|
| } // namespace service
|
| } // namespace mojo
|
|
|