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 "mash/package/mash_packaged_service.h" | 5 #include "mash/package/mash_packaged_service.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/debugger.h" | 9 #include "base/debug/debugger.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/process/process.h" | 11 #include "base/process/process.h" |
12 #include "mash/catalog_viewer/catalog_viewer.h" | 12 #include "mash/catalog_viewer/catalog_viewer.h" |
13 #include "mash/catalog_viewer/public/interfaces/constants.mojom.h" | 13 #include "mash/catalog_viewer/public/interfaces/constants.mojom.h" |
14 #include "mash/quick_launch/public/interfaces/constants.mojom.h" | 14 #include "mash/quick_launch/public/interfaces/constants.mojom.h" |
15 #include "mash/quick_launch/quick_launch.h" | 15 #include "mash/quick_launch/quick_launch.h" |
16 #include "mash/session/public/interfaces/constants.mojom.h" | 16 #include "mash/session/public/interfaces/constants.mojom.h" |
17 #include "mash/session/session.h" | 17 #include "mash/session/session.h" |
18 #include "mash/task_viewer/public/interfaces/constants.mojom.h" | 18 #include "mash/task_viewer/public/interfaces/constants.mojom.h" |
19 #include "mash/task_viewer/task_viewer.h" | 19 #include "mash/task_viewer/task_viewer.h" |
20 #include "services/service_manager/public/cpp/interface_registry.h" | 20 #include "services/service_manager/public/cpp/interface_registry.h" |
21 #include "services/service_manager/public/cpp/service_context.h" | 21 #include "services/service_manager/public/cpp/service_context.h" |
22 #include "services/ui/ime/test_ime_driver/test_ime_application.h" | 22 #include "services/ui/ime/test_ime_driver/test_ime_application.h" |
23 #include "services/ui/public/interfaces/constants.mojom.h" | 23 #include "services/ui/public/interfaces/constants.mojom.h" |
24 #include "services/ui/service.h" | 24 #include "services/ui/service.h" |
25 | 25 |
26 #if defined(OS_CHROMEOS) | 26 #if defined(OS_CHROMEOS) |
27 #include "ash/autoclick/mus/autoclick_application.h" // nogncheck | 27 #include "ash/autoclick/mus/autoclick_application.h" // nogncheck |
28 #include "ash/mus/window_manager_application.h" // nogncheck | 28 #include "ash/mus/window_manager_application.h" // nogncheck |
| 29 #include "ash/public/interfaces/constants.mojom.h" // nogncheck |
29 #include "ash/touch_hud/mus/touch_hud_application.h" // nogncheck | 30 #include "ash/touch_hud/mus/touch_hud_application.h" // nogncheck |
30 #endif | 31 #endif |
31 | 32 |
32 #if defined(OS_LINUX) | 33 #if defined(OS_LINUX) |
33 #include "components/font_service/font_service_app.h" | 34 #include "components/font_service/font_service_app.h" |
34 #endif | 35 #endif |
35 | 36 |
36 namespace mash { | 37 namespace mash { |
37 | 38 |
38 MashPackagedService::MashPackagedService() {} | 39 MashPackagedService::MashPackagedService() {} |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 switches::kWaitForDebugger); | 78 switches::kWaitForDebugger); |
78 if (!debugger_target.empty()) { | 79 if (!debugger_target.empty()) { |
79 if (name == debugger_target) { | 80 if (name == debugger_target) { |
80 LOG(WARNING) << "waiting for debugger to attach for service " << name | 81 LOG(WARNING) << "waiting for debugger to attach for service " << name |
81 << " pid=" << base::Process::Current().Pid(); | 82 << " pid=" << base::Process::Current().Pid(); |
82 base::debug::WaitForDebugger(120, true); | 83 base::debug::WaitForDebugger(120, true); |
83 } | 84 } |
84 } | 85 } |
85 | 86 |
86 #if defined(OS_CHROMEOS) | 87 #if defined(OS_CHROMEOS) |
87 if (name == "ash") | 88 if (name == ash::mojom::kServiceName) |
88 return base::WrapUnique(new ash::mus::WindowManagerApplication); | 89 return base::WrapUnique(new ash::mus::WindowManagerApplication); |
89 if (name == "accessibility_autoclick") | 90 if (name == "accessibility_autoclick") |
90 return base::WrapUnique(new ash::autoclick::AutoclickApplication); | 91 return base::WrapUnique(new ash::autoclick::AutoclickApplication); |
91 if (name == "touch_hud") | 92 if (name == "touch_hud") |
92 return base::WrapUnique(new ash::touch_hud::TouchHudApplication); | 93 return base::WrapUnique(new ash::touch_hud::TouchHudApplication); |
93 #endif | 94 #endif |
94 if (name == catalog_viewer::mojom::kServiceName) | 95 if (name == catalog_viewer::mojom::kServiceName) |
95 return base::WrapUnique(new mash::catalog_viewer::CatalogViewer); | 96 return base::WrapUnique(new mash::catalog_viewer::CatalogViewer); |
96 if (name == session::mojom::kServiceName) | 97 if (name == session::mojom::kServiceName) |
97 return base::WrapUnique(new mash::session::Session); | 98 return base::WrapUnique(new mash::session::Session); |
98 if (name == ui::mojom::kServiceName) | 99 if (name == ui::mojom::kServiceName) |
99 return base::WrapUnique(new ui::Service); | 100 return base::WrapUnique(new ui::Service); |
100 if (name == quick_launch::mojom::kServiceName) | 101 if (name == quick_launch::mojom::kServiceName) |
101 return base::WrapUnique(new mash::quick_launch::QuickLaunch); | 102 return base::WrapUnique(new mash::quick_launch::QuickLaunch); |
102 if (name == task_viewer::mojom::kServiceName) | 103 if (name == task_viewer::mojom::kServiceName) |
103 return base::WrapUnique(new mash::task_viewer::TaskViewer); | 104 return base::WrapUnique(new mash::task_viewer::TaskViewer); |
104 if (name == "test_ime_driver") | 105 if (name == "test_ime_driver") |
105 return base::WrapUnique(new ui::test::TestIMEApplication); | 106 return base::WrapUnique(new ui::test::TestIMEApplication); |
106 #if defined(OS_LINUX) | 107 #if defined(OS_LINUX) |
107 if (name == "font_service") | 108 if (name == "font_service") |
108 return base::WrapUnique(new font_service::FontServiceApp); | 109 return base::WrapUnique(new font_service::FontServiceApp); |
109 #endif | 110 #endif |
110 return nullptr; | 111 return nullptr; |
111 } | 112 } |
112 | 113 |
113 } // namespace mash | 114 } // namespace mash |
OLD | NEW |