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 SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ | 5 #ifndef SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ |
6 #define SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ | 6 #define SERVICES_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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 void SetConnectionLostClosure(const base::Closure& handler) override; | 48 void SetConnectionLostClosure(const base::Closure& handler) override; |
49 shell::mojom::ConnectResult GetResult() const override; | 49 shell::mojom::ConnectResult GetResult() const override; |
50 bool IsPending() const override; | 50 bool IsPending() const override; |
51 uint32_t GetRemoteInstanceID() const override; | 51 uint32_t GetRemoteInstanceID() const override; |
52 void AddConnectionCompletedClosure(const mojo::Closure& callback) override; | 52 void AddConnectionCompletedClosure(const mojo::Closure& callback) override; |
53 bool AllowsInterface(const std::string& interface_name) const override; | 53 bool AllowsInterface(const std::string& interface_name) const override; |
54 InterfaceRegistry* GetInterfaceRegistry() override; | 54 InterfaceRegistry* GetInterfaceRegistry() override; |
55 base::WeakPtr<Connection> GetWeakPtr() override; | 55 base::WeakPtr<Connection> GetWeakPtr() override; |
56 | 56 |
57 void OnConnectionCompleted(shell::mojom::ConnectResult result, | 57 void OnConnectionCompleted(shell::mojom::ConnectResult result, |
58 const std::string& target_user_id, | 58 mojo::String target_user_id, |
59 uint32_t target_application_id); | 59 uint32_t target_application_id); |
60 | 60 |
61 const std::string connection_name_; | 61 const std::string connection_name_; |
62 Identity remote_; | 62 Identity remote_; |
63 uint32_t remote_id_ = shell::mojom::kInvalidInstanceID; | 63 uint32_t remote_id_ = shell::mojom::kInvalidInstanceID; |
64 | 64 |
65 State state_; | 65 State state_; |
66 shell::mojom::ConnectResult result_ = shell::mojom::ConnectResult::SUCCEEDED; | 66 shell::mojom::ConnectResult result_ = shell::mojom::ConnectResult::SUCCEEDED; |
67 std::vector<mojo::Closure> connection_completed_callbacks_; | 67 std::vector<mojo::Closure> connection_completed_callbacks_; |
68 | 68 |
69 InterfaceRegistry interfaces_; | 69 InterfaceRegistry interfaces_; |
70 | 70 |
71 const CapabilityRequest capability_request_; | 71 const CapabilityRequest capability_request_; |
72 const bool allow_all_interfaces_; | 72 const bool allow_all_interfaces_; |
73 | 73 |
74 base::WeakPtrFactory<ConnectionImpl> weak_factory_; | 74 base::WeakPtrFactory<ConnectionImpl> weak_factory_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(ConnectionImpl); | 76 DISALLOW_COPY_AND_ASSIGN(ConnectionImpl); |
77 }; | 77 }; |
78 | 78 |
79 } // namespace internal | 79 } // namespace internal |
80 } // namespace shell | 80 } // namespace shell |
81 | 81 |
82 #endif // SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ | 82 #endif // SERVICES_SHELL_PUBLIC_CPP_LIB_CONNECTION_IMPL_H_ |
OLD | NEW |