| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ | 5 #ifndef SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ | 
| 6 #define MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ | 6 #define SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ | 
| 7 | 7 | 
| 8 #include <stdint.h> | 8 #include <stdint.h> | 
| 9 | 9 | 
| 10 #include <string> | 10 #include <string> | 
| 11 #include <utility> | 11 #include <utility> | 
| 12 | 12 | 
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" | 
| 14 #include "mojo/shell/public/cpp/connect.h" | 14 #include "services/shell/public/cpp/connect.h" | 
| 15 #include "mojo/shell/public/cpp/identity.h" | 15 #include "services/shell/public/cpp/identity.h" | 
| 16 #include "mojo/shell/public/cpp/interface_registry.h" | 16 #include "services/shell/public/cpp/interface_registry.h" | 
| 17 #include "mojo/shell/public/interfaces/connector.mojom.h" | 17 #include "services/shell/public/interfaces/connector.mojom.h" | 
| 18 #include "mojo/shell/public/interfaces/interface_provider.mojom.h" | 18 #include "services/shell/public/interfaces/interface_provider.mojom.h" | 
| 19 | 19 | 
| 20 namespace mojo { | 20 namespace mojo { | 
| 21 | 21 | 
| 22 class InterfaceBinder; | 22 class InterfaceBinder; | 
| 23 | 23 | 
| 24 // Represents a connection to another application. An instance of this class is | 24 // Represents a connection to another application. An instance of this class is | 
| 25 // returned from Shell's ConnectToApplication(), and passed to ShellClient's | 25 // returned from Shell's ConnectToApplication(), and passed to ShellClient's | 
| 26 // AcceptConnection() each time an incoming connection is received. | 26 // AcceptConnection() each time an incoming connection is received. | 
| 27 // | 27 // | 
| 28 // Call AddService<T>(factory) to expose an interface to the remote application, | 28 // Call AddService<T>(factory) to expose an interface to the remote application, | 
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 137   virtual shell::mojom::InterfaceProvider* GetRemoteInterfaces() = 0; | 137   virtual shell::mojom::InterfaceProvider* GetRemoteInterfaces() = 0; | 
| 138 | 138 | 
| 139  protected: | 139  protected: | 
| 140   virtual InterfaceRegistry* GetLocalRegistry() = 0; | 140   virtual InterfaceRegistry* GetLocalRegistry() = 0; | 
| 141 | 141 | 
| 142   virtual base::WeakPtr<Connection> GetWeakPtr() = 0; | 142   virtual base::WeakPtr<Connection> GetWeakPtr() = 0; | 
| 143 }; | 143 }; | 
| 144 | 144 | 
| 145 }  // namespace mojo | 145 }  // namespace mojo | 
| 146 | 146 | 
| 147 #endif  // MOJO_SHELL_PUBLIC_CPP_CONNECTION_H_ | 147 #endif  // SERVICES_SHELL_PUBLIC_CPP_CONNECTION_H_ | 
| OLD | NEW | 
|---|