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

Unified Diff: content/common/mojo/service_registry_impl.h

Issue 1128493002: Add connection error handing in ServiceRegistryImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 years, 7 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 | content/common/mojo/service_registry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/mojo/service_registry_impl.h
diff --git a/content/common/mojo/service_registry_impl.h b/content/common/mojo/service_registry_impl.h
index 5cdd322606338c6b9bf9f37d23ec3cf1703245da..c2346766286a456642d046ae8f6b87eadff6b5ec 100644
--- a/content/common/mojo/service_registry_impl.h
+++ b/content/common/mojo/service_registry_impl.h
@@ -16,13 +16,15 @@
#include "content/public/common/service_registry.h"
#include "mojo/application/public/interfaces/service_provider.mojom.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/error_handler.h"
#include "third_party/mojo/src/mojo/public/cpp/system/core.h"
namespace content {
class CONTENT_EXPORT ServiceRegistryImpl
: public ServiceRegistry,
- public NON_EXPORTED_BASE(mojo::ServiceProvider) {
+ public NON_EXPORTED_BASE(mojo::ServiceProvider),
+ public NON_EXPORTED_BASE(mojo::ErrorHandler) {
public:
ServiceRegistryImpl();
~ServiceRegistryImpl() override;
@@ -44,6 +46,8 @@ class CONTENT_EXPORT ServiceRegistryImpl
void ConnectToRemoteService(const base::StringPiece& service_name,
mojo::ScopedMessagePipeHandle handle) override;
+ bool IsBound() const;
+
base::WeakPtr<ServiceRegistry> GetWeakPtr();
private:
@@ -51,6 +55,9 @@ class CONTENT_EXPORT ServiceRegistryImpl
void ConnectToService(const mojo::String& name,
mojo::ScopedMessagePipeHandle client_handle) override;
+ // mojo::ErrorHandler overrides.
+ void OnConnectionError() override;
+
mojo::Binding<mojo::ServiceProvider> binding_;
mojo::ServiceProviderPtr remote_provider_;
« no previous file with comments | « no previous file | content/common/mojo/service_registry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698