OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/service_manager/tests/lifecycle/app_client.h" | 5 #include "services/service_manager/tests/lifecycle/app_client.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/message_loop/message_loop.h" |
8 #include "services/service_manager/public/cpp/service_context.h" | 9 #include "services/service_manager/public/cpp/service_context.h" |
9 | 10 |
10 namespace service_manager { | 11 namespace service_manager { |
11 namespace test { | 12 namespace test { |
12 | 13 |
13 AppClient::AppClient() { | 14 AppClient::AppClient() { |
14 registry_.AddInterface<mojom::LifecycleControl>( | 15 registry_.AddInterface<mojom::LifecycleControl>( |
15 base::Bind(&AppClient::Create, base::Unretained(this))); | 16 base::Bind(&AppClient::Create, base::Unretained(this))); |
16 } | 17 } |
17 | 18 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 base::Bind(&AppClient::BindingLost, base::Unretained(this))); | 56 base::Bind(&AppClient::BindingLost, base::Unretained(this))); |
56 } | 57 } |
57 | 58 |
58 void AppClient::BindingLost() { | 59 void AppClient::BindingLost() { |
59 if (bindings_.empty()) | 60 if (bindings_.empty()) |
60 OnServiceManagerConnectionLost(); | 61 OnServiceManagerConnectionLost(); |
61 } | 62 } |
62 | 63 |
63 } // namespace test | 64 } // namespace test |
64 } // namespace service_manager | 65 } // namespace service_manager |
OLD | NEW |