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_runner.h" | 5 #include "services/service_manager/public/cpp/service_runner.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/process/launch.h" | 11 #include "base/process/launch.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "services/shell/public/cpp/service.h" | 13 #include "services/service_manager/public/cpp/service.h" |
14 #include "services/shell/public/cpp/service_context.h" | 14 #include "services/service_manager/public/cpp/service_context.h" |
15 | 15 |
16 namespace shell { | 16 namespace shell { |
17 | 17 |
18 int g_service_runner_argc; | 18 int g_service_runner_argc; |
19 const char* const* g_service_runner_argv; | 19 const char* const* g_service_runner_argv; |
20 | 20 |
21 ServiceRunner::ServiceRunner(Service* service) | 21 ServiceRunner::ServiceRunner(Service* service) |
22 : service_(base::WrapUnique(service)), | 22 : service_(base::WrapUnique(service)), |
23 message_loop_type_(base::MessageLoop::TYPE_DEFAULT), | 23 message_loop_type_(base::MessageLoop::TYPE_DEFAULT), |
24 has_run_(false) {} | 24 has_run_(false) {} |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 void ServiceRunner::DestroyServiceContext() { | 83 void ServiceRunner::DestroyServiceContext() { |
84 service_->set_context(std::unique_ptr<ServiceContext>()); | 84 service_->set_context(std::unique_ptr<ServiceContext>()); |
85 } | 85 } |
86 | 86 |
87 void ServiceRunner::Quit() { | 87 void ServiceRunner::Quit() { |
88 base::MessageLoop::current()->QuitWhenIdle(); | 88 base::MessageLoop::current()->QuitWhenIdle(); |
89 } | 89 } |
90 | 90 |
91 } // namespace shell | 91 } // namespace shell |
OLD | NEW |