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 #include "services/shell/public/cpp/service_context.h" | 5 #include "services/service_manager/public/cpp/service_context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "mojo/public/cpp/bindings/interface_ptr.h" | 10 #include "mojo/public/cpp/bindings/interface_ptr.h" |
11 #include "mojo/public/cpp/bindings/interface_request.h" | 11 #include "mojo/public/cpp/bindings/interface_request.h" |
12 #include "services/shell/public/cpp/capabilities.h" | 12 #include "services/service_manager/public/cpp/capabilities.h" |
13 #include "services/shell/public/cpp/interface_registry.h" | 13 #include "services/service_manager/public/cpp/interface_registry.h" |
14 #include "services/shell/public/cpp/lib/connector_impl.h" | 14 #include "services/service_manager/public/cpp/lib/connector_impl.h" |
15 #include "services/shell/public/cpp/service.h" | 15 #include "services/service_manager/public/cpp/service.h" |
16 | 16 |
17 namespace shell { | 17 namespace shell { |
18 | 18 |
19 //////////////////////////////////////////////////////////////////////////////// | 19 //////////////////////////////////////////////////////////////////////////////// |
20 // ServiceContext, public: | 20 // ServiceContext, public: |
21 | 21 |
22 ServiceContext::ServiceContext(shell::Service* service, | 22 ServiceContext::ServiceContext(shell::Service* service, |
23 mojom::ServiceRequest request, | 23 mojom::ServiceRequest request, |
24 std::unique_ptr<Connector> connector, | 24 std::unique_ptr<Connector> connector, |
25 mojom::ConnectorRequest connector_request) | 25 mojom::ConnectorRequest connector_request) |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // invalid. | 87 // invalid. |
88 should_run_connection_lost_closure_ = service_->OnStop(); | 88 should_run_connection_lost_closure_ = service_->OnStop(); |
89 if (should_run_connection_lost_closure_ && | 89 if (should_run_connection_lost_closure_ && |
90 !connection_lost_closure_.is_null()) | 90 !connection_lost_closure_.is_null()) |
91 connection_lost_closure_.Run(); | 91 connection_lost_closure_.Run(); |
92 // We don't reset the connector as clients may have taken a raw pointer to it. | 92 // We don't reset the connector as clients may have taken a raw pointer to it. |
93 // Connect() will return nullptr if they try to connect to anything. | 93 // Connect() will return nullptr if they try to connect to anything. |
94 } | 94 } |
95 | 95 |
96 } // namespace shell | 96 } // namespace shell |
OLD | NEW |