| 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_LIB_CONNECTION_IMPL_H_ | 5 #ifndef MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ |
| 6 #define MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ | 6 #define MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 shell::mojom::Shell::ConnectToApplicationCallback | 38 shell::mojom::Shell::ConnectToApplicationCallback |
| 39 GetConnectToApplicationCallback(); | 39 GetConnectToApplicationCallback(); |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 // Connection: | 42 // Connection: |
| 43 const std::string& GetConnectionURL() override; | 43 const std::string& GetConnectionURL() override; |
| 44 const std::string& GetRemoteApplicationURL() override; | 44 const std::string& GetRemoteApplicationURL() override; |
| 45 void SetRemoteInterfaceProviderConnectionErrorHandler( | 45 void SetRemoteInterfaceProviderConnectionErrorHandler( |
| 46 const Closure& handler) override; | 46 const Closure& handler) override; |
| 47 bool GetRemoteApplicationID(uint32_t* remote_id) const override; | 47 bool GetRemoteApplicationID(uint32_t* remote_id) const override; |
| 48 bool GetRemoteContentHandlerID(uint32_t* content_handler_id) const override; | 48 bool GetRemoteShellClientFactoryID( |
| 49 uint32_t* shell_client_factory_id) const override; |
| 49 void AddRemoteIDCallback(const Closure& callback) override; | 50 void AddRemoteIDCallback(const Closure& callback) override; |
| 50 bool AllowsInterface(const std::string& interface_name) const override; | 51 bool AllowsInterface(const std::string& interface_name) const override; |
| 51 shell::mojom::InterfaceProvider* GetRemoteInterfaces() override; | 52 shell::mojom::InterfaceProvider* GetRemoteInterfaces() override; |
| 52 InterfaceRegistry* GetLocalRegistry() override; | 53 InterfaceRegistry* GetLocalRegistry() override; |
| 53 base::WeakPtr<Connection> GetWeakPtr() override; | 54 base::WeakPtr<Connection> GetWeakPtr() override; |
| 54 | 55 |
| 55 void OnGotRemoteIDs(uint32_t target_application_id, | 56 void OnGotRemoteIDs(uint32_t target_application_id, |
| 56 uint32_t content_handler_id); | 57 uint32_t shell_client_factory_id); |
| 57 | 58 |
| 58 const std::string connection_url_; | 59 const std::string connection_url_; |
| 59 const std::string remote_url_; | 60 const std::string remote_url_; |
| 60 | 61 |
| 61 uint32_t remote_id_; | 62 uint32_t remote_id_; |
| 62 // The id of the content_handler is only available once the callback from | 63 // The id of the shell_client_factory is only available once the callback from |
| 63 // establishing the connection is made. | 64 // establishing the connection is made. |
| 64 uint32_t content_handler_id_; | 65 uint32_t shell_client_factory_id_; |
| 65 bool remote_ids_valid_; | 66 bool remote_ids_valid_; |
| 66 std::vector<Closure> remote_id_callbacks_; | 67 std::vector<Closure> remote_id_callbacks_; |
| 67 | 68 |
| 68 InterfaceRegistry local_registry_; | 69 InterfaceRegistry local_registry_; |
| 69 shell::mojom::InterfaceProviderPtr remote_interfaces_; | 70 shell::mojom::InterfaceProviderPtr remote_interfaces_; |
| 70 | 71 |
| 71 const std::set<std::string> allowed_interfaces_; | 72 const std::set<std::string> allowed_interfaces_; |
| 72 const bool allow_all_interfaces_; | 73 const bool allow_all_interfaces_; |
| 73 | 74 |
| 74 base::WeakPtrFactory<ConnectionImpl> weak_factory_; | 75 base::WeakPtrFactory<ConnectionImpl> weak_factory_; |
| 75 | 76 |
| 76 MOJO_DISALLOW_COPY_AND_ASSIGN(ConnectionImpl); | 77 MOJO_DISALLOW_COPY_AND_ASSIGN(ConnectionImpl); |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 } // namespace internal | 80 } // namespace internal |
| 80 } // namespace mojo | 81 } // namespace mojo |
| 81 | 82 |
| 82 #endif // MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ | 83 #endif // MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ |
| OLD | NEW |