| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 mojom::InterfaceProviderRequest interfaces, | 71 mojom::InterfaceProviderRequest interfaces, |
| 72 mojom::CapabilityRequestPtr allowed_capabilities) override; | 72 mojom::CapabilityRequestPtr allowed_capabilities) override; |
| 73 | 73 |
| 74 void OnConnectionError(); | 74 void OnConnectionError(); |
| 75 | 75 |
| 76 // A callback called when OnStart() is run. | 76 // A callback called when OnStart() is run. |
| 77 base::Closure initialize_handler_; | 77 base::Closure initialize_handler_; |
| 78 | 78 |
| 79 // We track the lifetime of incoming connection registries as it more | 79 // We track the lifetime of incoming connection registries as it more |
| 80 // convenient for the client. | 80 // convenient for the client. |
| 81 std::vector<std::unique_ptr<Connection>> incoming_connections_; | 81 std::vector<std::unique_ptr<InterfaceRegistry>> incoming_connections_; |
| 82 | 82 |
| 83 // A pending Connector request which will eventually be passed to the Service | 83 // A pending Connector request which will eventually be passed to the Service |
| 84 // Manager. | 84 // Manager. |
| 85 mojom::ConnectorRequest pending_connector_request_; | 85 mojom::ConnectorRequest pending_connector_request_; |
| 86 | 86 |
| 87 shell::Service* service_; | 87 shell::Service* service_; |
| 88 mojo::Binding<mojom::Service> binding_; | 88 mojo::Binding<mojom::Service> binding_; |
| 89 std::unique_ptr<Connector> connector_; | 89 std::unique_ptr<Connector> connector_; |
| 90 shell::Identity identity_; | 90 shell::Identity identity_; |
| 91 bool should_run_connection_lost_closure_ = false; | 91 bool should_run_connection_lost_closure_ = false; |
| 92 | 92 |
| 93 base::Closure connection_lost_closure_; | 93 base::Closure connection_lost_closure_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(ServiceContext); | 95 DISALLOW_COPY_AND_ASSIGN(ServiceContext); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 } // namespace shell | 98 } // namespace shell |
| 99 | 99 |
| 100 #endif // SERVICES_SHELL_PUBLIC_CPP_SERVICE_CONTEXT_H_ | 100 #endif // SERVICES_SHELL_PUBLIC_CPP_SERVICE_CONTEXT_H_ |
| OLD | NEW |