| 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/shell/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/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 15 #include "base/synchronization/waitable_event.h" | 15 #include "base/synchronization/waitable_event.h" |
| 16 #include "base/threading/simple_thread.h" | 16 #include "base/threading/simple_thread.h" |
| 17 #include "services/catalog/store.h" | 17 #include "services/catalog/store.h" |
| 18 #include "services/shell/connect_params.h" | 18 #include "services/shell/connect_params.h" |
| 19 #include "services/shell/public/cpp/service.h" | 19 #include "services/shell/public/cpp/service.h" |
| 20 #include "services/shell/public/cpp/shell_connection.h" | 20 #include "services/shell/public/cpp/service_context.h" |
| 21 #include "services/shell/service_manager.h" | 21 #include "services/shell/service_manager.h" |
| 22 #include "services/shell/standalone/context.h" | 22 #include "services/shell/standalone/context.h" |
| 23 | 23 |
| 24 namespace shell { | 24 namespace shell { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 std::unique_ptr<base::MessagePump> CreateDefaultMessagePump() { | 28 std::unique_ptr<base::MessagePump> CreateDefaultMessagePump() { |
| 29 return base::WrapUnique(new base::MessagePumpDefault); | 29 return base::WrapUnique(new base::MessagePumpDefault); |
| 30 } | 30 } |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 168 } |
| 169 | 169 |
| 170 void BackgroundShell::ExecuteOnServiceManagerThread( | 170 void BackgroundShell::ExecuteOnServiceManagerThread( |
| 171 const ServiceManagerThreadCallback& callback) { | 171 const ServiceManagerThreadCallback& callback) { |
| 172 thread_->message_loop()->task_runner()->PostTask( | 172 thread_->message_loop()->task_runner()->PostTask( |
| 173 FROM_HERE, base::Bind(&MojoThread::RunServiceManagerCallback, | 173 FROM_HERE, base::Bind(&MojoThread::RunServiceManagerCallback, |
| 174 base::Unretained(thread_.get()), callback)); | 174 base::Unretained(thread_.get()), callback)); |
| 175 } | 175 } |
| 176 | 176 |
| 177 } // namespace shell | 177 } // namespace shell |
| OLD | NEW |