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

Unified Diff: services/shell/public/cpp/connection.h

Issue 2075003002: Separate Remote InterfaceProvider again, and add a new client lib type for it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 | « services/shell/public/cpp/BUILD.gn ('k') | services/shell/public/cpp/interface_registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/shell/public/cpp/connection.h
diff --git a/services/shell/public/cpp/connection.h b/services/shell/public/cpp/connection.h
index 56834d8795195117ddb839a60cd5ced26b2c97e8..74760ae754fd82eb9090990f19e9956317e15919 100644
--- a/services/shell/public/cpp/connection.h
+++ b/services/shell/public/cpp/connection.h
@@ -14,12 +14,14 @@
#include "services/shell/public/cpp/connect.h"
#include "services/shell/public/cpp/identity.h"
#include "services/shell/public/cpp/interface_registry.h"
+#include "services/shell/public/cpp/remote_interface_registry.h"
#include "services/shell/public/interfaces/connector.mojom.h"
#include "services/shell/public/interfaces/interface_provider.mojom.h"
namespace shell {
class InterfaceBinder;
+class RemoteInterfaceRegistry;
// Represents a connection to another application. An instance of this class is
// returned from Shell's ConnectToApplication(), and passed to ShellClient's
@@ -86,7 +88,7 @@ class Connection {
// interface.
template <typename Interface>
void GetInterface(mojo::InterfacePtr<Interface>* ptr) {
- GetInterfaceRegistry()->GetInterface(ptr);
+ GetRemoteInterfaceRegistry()->GetInterface(ptr);
}
// Returns true if the remote application has the specified capability class
@@ -138,11 +140,17 @@ class Connection {
// remote application.
virtual bool AllowsInterface(const std::string& interface_name) const = 0;
- // Returns the InterfaceRegistry that encapsulates the pair of
- // InterfaceProviders between this application and the remote.
- virtual InterfaceRegistry* GetInterfaceRegistry() = 0;
+ // Returns a raw pointer to the InterfaceProvider at the remote end.
+ virtual mojom::InterfaceProvider* GetRemoteInterfaceProvider() = 0;
protected:
+ // Returns the InterfaceRegistry that implements the mojom::InterfaceProvider
+ // exposed to the remote application.
+ virtual InterfaceRegistry* GetInterfaceRegistry() = 0;
+
+ // Returns an object encapsulating a remote InterfaceProvider.
+ virtual RemoteInterfaceRegistry* GetRemoteInterfaceRegistry() = 0;
+
virtual base::WeakPtr<Connection> GetWeakPtr() = 0;
};
« no previous file with comments | « services/shell/public/cpp/BUILD.gn ('k') | services/shell/public/cpp/interface_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698