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

Unified Diff: mojo/public/cpp/application/lib/service_provider_impl.cc

Issue 466273002: Remove OpenWindow from the WindowManager interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | « no previous file | mojo/public/cpp/application/lib/weak_service_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/application/lib/service_provider_impl.cc
diff --git a/mojo/public/cpp/application/lib/service_provider_impl.cc b/mojo/public/cpp/application/lib/service_provider_impl.cc
index c9706014d6ad0f9bbd5cc0a515537821ee40fa3f..1edebd25532529411866b2a1537080110c3402ad 100644
--- a/mojo/public/cpp/application/lib/service_provider_impl.cc
+++ b/mojo/public/cpp/application/lib/service_provider_impl.cc
@@ -19,7 +19,7 @@ ServiceProviderImpl::~ServiceProviderImpl() {
ServiceProvider* ServiceProviderImpl::CreateRemoteServiceProvider() {
// TODO(beng): it sure would be nice if this method could return a scoped_ptr.
MOJO_DCHECK(!remote_);
- remote_ = new internal::WeakServiceProvider(client());
+ remote_ = new internal::WeakServiceProvider(this, client());
return remote_;
}
@@ -38,10 +38,7 @@ void ServiceProviderImpl::ConnectToService(
}
void ServiceProviderImpl::OnConnectionError() {
- if (remote_) {
- remote_->Clear();
- remote_ = NULL;
- }
+ ClearRemote();
}
void ServiceProviderImpl::AddServiceConnector(
@@ -62,4 +59,11 @@ void ServiceProviderImpl::RemoveServiceConnector(
service_connectors_.erase(it);
}
+void ServiceProviderImpl::ClearRemote() {
+ if (remote_) {
+ remote_->Clear();
+ remote_ = NULL;
+ }
+}
+
} // namespace mojo
« no previous file with comments | « no previous file | mojo/public/cpp/application/lib/weak_service_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698