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_SERVICE_CONTEXT_H_ | 5 #ifndef SERVICES_SHELL_PUBLIC_CPP_SERVICE_CONTEXT_H_ |
6 #define SERVICES_SHELL_PUBLIC_CPP_SERVICE_CONTEXT_H_ | 6 #define SERVICES_SHELL_PUBLIC_CPP_SERVICE_CONTEXT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 // immediately. | 63 // immediately. |
64 void SetConnectionLostClosure(const base::Closure& closure); | 64 void SetConnectionLostClosure(const base::Closure& closure); |
65 | 65 |
66 private: | 66 private: |
67 // mojom::Service: | 67 // mojom::Service: |
68 void OnStart(mojom::IdentityPtr identity, | 68 void OnStart(mojom::IdentityPtr identity, |
69 uint32_t id, | 69 uint32_t id, |
70 const OnStartCallback& callback) override; | 70 const OnStartCallback& callback) override; |
71 void OnConnect(mojom::IdentityPtr source, | 71 void OnConnect(mojom::IdentityPtr source, |
72 uint32_t source_id, | 72 uint32_t source_id, |
73 mojom::InterfaceProviderRequest remote_interfaces, | 73 mojom::InterfaceProviderRequest interfaces, |
74 mojom::InterfaceProviderPtr local_interfaces, | |
75 mojom::CapabilityRequestPtr allowed_capabilities, | 74 mojom::CapabilityRequestPtr allowed_capabilities, |
76 const mojo::String& name) override; | 75 const mojo::String& name) override; |
77 | 76 |
78 void OnConnectionError(); | 77 void OnConnectionError(); |
79 | 78 |
80 // A callback called when OnStart() is run. | 79 // A callback called when OnStart() is run. |
81 base::Closure initialize_handler_; | 80 base::Closure initialize_handler_; |
82 | 81 |
83 // We track the lifetime of incoming connection registries as it more | 82 // We track the lifetime of incoming connection registries as it more |
84 // convenient for the client. | 83 // convenient for the client. |
(...skipping 10 matching lines...) Expand all Loading... |
95 bool should_run_connection_lost_closure_ = false; | 94 bool should_run_connection_lost_closure_ = false; |
96 | 95 |
97 base::Closure connection_lost_closure_; | 96 base::Closure connection_lost_closure_; |
98 | 97 |
99 DISALLOW_COPY_AND_ASSIGN(ServiceContext); | 98 DISALLOW_COPY_AND_ASSIGN(ServiceContext); |
100 }; | 99 }; |
101 | 100 |
102 } // namespace shell | 101 } // namespace shell |
103 | 102 |
104 #endif // SERVICES_SHELL_PUBLIC_CPP_SERVICE_CONTEXT_H_ | 103 #endif // SERVICES_SHELL_PUBLIC_CPP_SERVICE_CONTEXT_H_ |
OLD | NEW |