| 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 GetRemoteShellClientFactoryID( | |
| 49 uint32_t* shell_client_factory_id) const override; | |
| 50 void AddRemoteIDCallback(const Closure& callback) override; | 48 void AddRemoteIDCallback(const Closure& callback) override; |
| 51 bool AllowsInterface(const std::string& interface_name) const override; | 49 bool AllowsInterface(const std::string& interface_name) const override; |
| 52 shell::mojom::InterfaceProvider* GetRemoteInterfaces() override; | 50 shell::mojom::InterfaceProvider* GetRemoteInterfaces() override; |
| 53 InterfaceRegistry* GetLocalRegistry() override; | 51 InterfaceRegistry* GetLocalRegistry() override; |
| 54 base::WeakPtr<Connection> GetWeakPtr() override; | 52 base::WeakPtr<Connection> GetWeakPtr() override; |
| 55 | 53 |
| 56 void OnGotRemoteIDs(uint32_t target_application_id, | 54 void OnGotInstanceID(uint32_t target_application_id); |
| 57 uint32_t shell_client_factory_id); | |
| 58 | 55 |
| 59 const std::string connection_url_; | 56 const std::string connection_url_; |
| 60 const std::string remote_url_; | 57 const std::string remote_url_; |
| 61 | 58 |
| 62 uint32_t remote_id_; | 59 uint32_t remote_id_; |
| 63 // The id of the shell_client_factory is only available once the callback from | |
| 64 // establishing the connection is made. | |
| 65 uint32_t shell_client_factory_id_; | |
| 66 bool remote_ids_valid_; | 60 bool remote_ids_valid_; |
| 67 std::vector<Closure> remote_id_callbacks_; | 61 std::vector<Closure> remote_id_callbacks_; |
| 68 | 62 |
| 69 InterfaceRegistry local_registry_; | 63 InterfaceRegistry local_registry_; |
| 70 shell::mojom::InterfaceProviderPtr remote_interfaces_; | 64 shell::mojom::InterfaceProviderPtr remote_interfaces_; |
| 71 | 65 |
| 72 const std::set<std::string> allowed_interfaces_; | 66 const std::set<std::string> allowed_interfaces_; |
| 73 const bool allow_all_interfaces_; | 67 const bool allow_all_interfaces_; |
| 74 | 68 |
| 75 base::WeakPtrFactory<ConnectionImpl> weak_factory_; | 69 base::WeakPtrFactory<ConnectionImpl> weak_factory_; |
| 76 | 70 |
| 77 MOJO_DISALLOW_COPY_AND_ASSIGN(ConnectionImpl); | 71 MOJO_DISALLOW_COPY_AND_ASSIGN(ConnectionImpl); |
| 78 }; | 72 }; |
| 79 | 73 |
| 80 } // namespace internal | 74 } // namespace internal |
| 81 } // namespace mojo | 75 } // namespace mojo |
| 82 | 76 |
| 83 #endif // MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ | 77 #endif // MOJO_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ |
| OLD | NEW |