| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ | 5 #ifndef CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ |
| 6 #define CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ | 6 #define CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 ~MojoShellConnectionImpl() override; | 31 ~MojoShellConnectionImpl() override; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 // MojoShellConnection: | 34 // MojoShellConnection: |
| 35 shell::ShellConnection* GetShellConnection() override; | 35 shell::ShellConnection* GetShellConnection() override; |
| 36 shell::Connector* GetConnector() override; | 36 shell::Connector* GetConnector() override; |
| 37 const shell::Identity& GetIdentity() const override; | 37 const shell::Identity& GetIdentity() const override; |
| 38 void SetConnectionLostClosure(const base::Closure& closure) override; | 38 void SetConnectionLostClosure(const base::Closure& closure) override; |
| 39 void AddEmbeddedShellClient( | 39 void AddEmbeddedShellClient( |
| 40 std::unique_ptr<shell::ShellClient> shell_client) override; | 40 std::unique_ptr<shell::ShellClient> shell_client) override; |
| 41 void AddEmbeddedShellClient(shell::ShellClient* shell_client) override; |
| 41 void AddEmbeddedService(const std::string& name, | 42 void AddEmbeddedService(const std::string& name, |
| 42 const MojoApplicationInfo& info) override; | 43 const MojoApplicationInfo& info) override; |
| 43 void AddShellClientRequestHandler( | 44 void AddShellClientRequestHandler( |
| 44 const std::string& name, | 45 const std::string& name, |
| 45 const ShellClientRequestHandler& handler) override; | 46 const ShellClientRequestHandler& handler) override; |
| 46 | 47 |
| 47 // shell::ShellClient: | 48 // shell::ShellClient: |
| 48 void Initialize(shell::Connector* connector, | 49 void Initialize(shell::Connector* connector, |
| 49 const shell::Identity& identity, | 50 const shell::Identity& identity, |
| 50 uint32_t id) override; | 51 uint32_t id) override; |
| 51 bool AcceptConnection(shell::Connection* connection) override; | 52 bool AcceptConnection(shell::Connection* connection) override; |
| 53 shell::InterfaceRegistry* GetInterfaceRegistryForConnection() override; |
| 54 shell::InterfaceProvider* GetInterfaceProviderForConnection() override; |
| 52 | 55 |
| 53 // shell::InterfaceFactory<shell::mojom::ShellClientFactory>: | 56 // shell::InterfaceFactory<shell::mojom::ShellClientFactory>: |
| 54 void Create(shell::Connection* connection, | 57 void Create(shell::Connection* connection, |
| 55 shell::mojom::ShellClientFactoryRequest request) override; | 58 shell::mojom::ShellClientFactoryRequest request) override; |
| 56 | 59 |
| 57 // shell::mojom::ShellClientFactory: | 60 // shell::mojom::ShellClientFactory: |
| 58 void CreateShellClient(shell::mojom::ShellClientRequest request, | 61 void CreateShellClient(shell::mojom::ShellClientRequest request, |
| 59 const mojo::String& name) override; | 62 const mojo::String& name) override; |
| 60 | 63 |
| 61 std::unique_ptr<shell::ShellConnection> shell_connection_; | 64 std::unique_ptr<shell::ShellConnection> shell_connection_; |
| 62 mojo::BindingSet<shell::mojom::ShellClientFactory> factory_bindings_; | 65 mojo::BindingSet<shell::mojom::ShellClientFactory> factory_bindings_; |
| 63 std::vector<std::unique_ptr<shell::ShellClient>> embedded_shell_clients_; | 66 std::vector<shell::ShellClient*> embedded_shell_clients_; |
| 67 std::vector<std::unique_ptr<shell::ShellClient>> owned_shell_clients_; |
| 64 std::unordered_map<std::string, std::unique_ptr<EmbeddedApplicationRunner>> | 68 std::unordered_map<std::string, std::unique_ptr<EmbeddedApplicationRunner>> |
| 65 embedded_apps_; | 69 embedded_apps_; |
| 66 std::unordered_map<std::string, ShellClientRequestHandler> request_handlers_; | 70 std::unordered_map<std::string, ShellClientRequestHandler> request_handlers_; |
| 67 | 71 |
| 68 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl); | 72 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl); |
| 69 }; | 73 }; |
| 70 | 74 |
| 71 } // namespace content | 75 } // namespace content |
| 72 | 76 |
| 73 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ | 77 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ |
| OLD | NEW |