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/shell/background/background_shell.h" | 5 #include "services/service_manager/background/background_shell.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/message_loop/message_pump_default.h" | 12 #include "base/message_loop/message_pump_default.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
16 #include "base/synchronization/waitable_event.h" | 16 #include "base/synchronization/waitable_event.h" |
17 #include "base/threading/simple_thread.h" | 17 #include "base/threading/simple_thread.h" |
18 #include "services/catalog/store.h" | 18 #include "services/catalog/store.h" |
19 #include "services/shell/connect_params.h" | 19 #include "services/service_manager/connect_params.h" |
20 #include "services/shell/public/cpp/service.h" | 20 #include "services/service_manager/public/cpp/service.h" |
21 #include "services/shell/public/cpp/service_context.h" | 21 #include "services/service_manager/public/cpp/service_context.h" |
22 #include "services/shell/service_manager.h" | 22 #include "services/service_manager/service_manager.h" |
23 #include "services/shell/standalone/context.h" | 23 #include "services/service_manager/standalone/context.h" |
24 | 24 |
25 namespace shell { | 25 namespace shell { |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 std::unique_ptr<base::MessagePump> CreateDefaultMessagePump() { | 29 std::unique_ptr<base::MessagePump> CreateDefaultMessagePump() { |
30 return base::WrapUnique(new base::MessagePumpDefault); | 30 return base::WrapUnique(new base::MessagePumpDefault); |
31 } | 31 } |
32 | 32 |
33 class MojoMessageLoop : public base::MessageLoop { | 33 class MojoMessageLoop : public base::MessageLoop { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 } | 169 } |
170 | 170 |
171 void BackgroundShell::ExecuteOnServiceManagerThread( | 171 void BackgroundShell::ExecuteOnServiceManagerThread( |
172 const ServiceManagerThreadCallback& callback) { | 172 const ServiceManagerThreadCallback& callback) { |
173 thread_->message_loop()->task_runner()->PostTask( | 173 thread_->message_loop()->task_runner()->PostTask( |
174 FROM_HERE, base::Bind(&MojoThread::RunServiceManagerCallback, | 174 FROM_HERE, base::Bind(&MojoThread::RunServiceManagerCallback, |
175 base::Unretained(thread_.get()), callback)); | 175 base::Unretained(thread_.get()), callback)); |
176 } | 176 } |
177 | 177 |
178 } // namespace shell | 178 } // namespace shell |
OLD | NEW |