Index: services/shell/public/cpp/connection.h |
diff --git a/services/shell/public/cpp/connection.h b/services/shell/public/cpp/connection.h |
index 002cb7d492f02e7432a1e1f6a391342826ec3b05..1035eb6f845fb2a380e40d41420b57c07231e19a 100644 |
--- a/services/shell/public/cpp/connection.h |
+++ b/services/shell/public/cpp/connection.h |
@@ -5,40 +5,16 @@ |
#ifndef SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ |
#define SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ |
-#include <stdint.h> |
- |
-#include <string> |
-#include <utility> |
- |
-#include "base/callback_forward.h" |
#include "base/memory/weak_ptr.h" |
-#include "services/shell/public/cpp/connect.h" |
#include "services/shell/public/cpp/identity.h" |
#include "services/shell/public/cpp/interface_provider.h" |
-#include "services/shell/public/cpp/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 InterfaceProvider; |
-// Represents a connection to another application. An instance of this class is |
-// returned from Shell's ConnectToApplication(), and passed to Service's |
-// OnConnect() each time an incoming connection is received. |
-// |
-// Call AddService<T>(factory) to expose an interface to the remote application, |
-// and GetInterface(&interface_ptr) to consume an interface exposed by the |
-// remote application. |
-// |
-// Internally, this class wraps an InterfaceRegistry that accepts interfaces |
-// that may be exposed to a remote application. See documentation in |
-// interface_registry.h for more information. |
-// |
-// A Connection returned via Shell::ConnectToApplication() is owned by the |
-// caller. A Connection received via OnConnect is owned by the ServiceContext. |
-// To close a connection, call CloseConnection which will destroy this object. |
+// Represents a connection to another application. An implementation of this |
+// interface is returned from Connector::Connect(). |
class Connection { |
public: |
virtual ~Connection() {} |
@@ -67,22 +43,6 @@ class Connection { |
Connection* connection_; |
}; |
- // Allow the remote application to request instances of Interface. |
- // |factory| will create implementations of Interface on demand. |
- // Returns true if the interface was exposed, false if capability filtering |
- // from the shell prevented the interface from being exposed. |
- template <typename Interface> |
- bool AddInterface(InterfaceFactory<Interface>* factory) { |
- return GetInterfaceRegistry()->AddInterface<Interface>(factory); |
- } |
- template <typename Interface> |
- bool AddInterface( |
- const base::Callback<void(mojo::InterfaceRequest<Interface>)>& callback, |
- const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) { |
- return GetInterfaceRegistry()->AddInterface<Interface>( |
- callback, task_runner); |
- } |
- |
// Binds |ptr| to an implementation of Interface in the remote application. |
// |ptr| can immediately be used to start sending requests to the remote |
// interface. |
@@ -95,11 +55,6 @@ class Connection { |
GetRemoteInterfaces()->GetInterface(std::move(request)); |
} |
- // Returns true if the remote application has the specified capability class |
- // specified in its manifest. Only valid for inbound connections. Will return |
- // false for outbound connections. |
- virtual bool HasCapabilityClass(const std::string& class_name) const = 0; |
- |
// Returns the remote identity. While the connection is in the pending state, |
// the user_id() field will be the value passed via Connect(). After the |
// connection is completed, it will change to the value assigned by the shell. |
@@ -126,14 +81,6 @@ class Connection { |
// available immediately. |
virtual void AddConnectionCompletedClosure(const base::Closure& callback) = 0; |
- // Returns true if the Shell allows |interface_name| to be exposed to the |
- // remote application. |
- virtual bool AllowsInterface(const std::string& interface_name) const = 0; |
- |
- // 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 InterfaceProvider* GetRemoteInterfaces() = 0; |