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 "chrome/app/mash/mash_runner.h" | 5 #include "chrome/app/mash/mash_runner.h" |
6 | 6 |
7 #include "ash/mus/window_manager_application.h" | 7 #include "ash/mus/window_manager_application.h" |
8 #include "ash/sysui/sysui_application.h" | 8 #include "ash/sysui/sysui_application.h" |
9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/debug/debugger.h" | 12 #include "base/debug/debugger.h" |
13 #include "base/i18n/icu_util.h" | 13 #include "base/i18n/icu_util.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
16 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
17 #include "base/process/launch.h" | 17 #include "base/process/launch.h" |
18 #include "components/mus/mus_app.h" | 18 #include "components/mus/mus_app.h" |
19 #include "content/public/common/content_switches.h" | 19 #include "content/public/common/content_switches.h" |
20 #include "mash/app_driver/app_driver.h" | 20 #include "mash/app_driver/app_driver.h" |
21 #include "mash/quick_launch/quick_launch_application.h" | 21 #include "mash/quick_launch/quick_launch_application.h" |
22 #include "mash/session/session.h" | 22 #include "mash/session/session.h" |
23 #include "mash/task_viewer/task_viewer.h" | 23 #include "mash/task_viewer/task_viewer.h" |
| 24 #include "mash/touch/touch_hud_application.h" |
24 #include "mojo/public/cpp/bindings/binding_set.h" | 25 #include "mojo/public/cpp/bindings/binding_set.h" |
25 #include "services/shell/background/background_shell.h" | 26 #include "services/shell/background/background_shell.h" |
26 #include "services/shell/native_runner_delegate.h" | 27 #include "services/shell/native_runner_delegate.h" |
27 #include "services/shell/public/cpp/connector.h" | 28 #include "services/shell/public/cpp/connector.h" |
28 #include "services/shell/public/cpp/identity.h" | 29 #include "services/shell/public/cpp/identity.h" |
29 #include "services/shell/public/cpp/shell_client.h" | 30 #include "services/shell/public/cpp/shell_client.h" |
30 #include "services/shell/public/cpp/shell_connection.h" | 31 #include "services/shell/public/cpp/shell_connection.h" |
31 #include "services/shell/public/interfaces/shell_client_factory.mojom.h" | 32 #include "services/shell/public/interfaces/shell_client_factory.mojom.h" |
32 #include "services/shell/runner/common/switches.h" | 33 #include "services/shell/runner/common/switches.h" |
33 #include "services/shell/runner/host/child_process_base.h" | 34 #include "services/shell/runner/host/child_process_base.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 if (name == "mojo:ash") | 90 if (name == "mojo:ash") |
90 return base::WrapUnique(new ash::mus::WindowManagerApplication); | 91 return base::WrapUnique(new ash::mus::WindowManagerApplication); |
91 if (name == "mojo:mash_session") | 92 if (name == "mojo:mash_session") |
92 return base::WrapUnique(new mash::session::Session); | 93 return base::WrapUnique(new mash::session::Session); |
93 if (name == "mojo:mus") | 94 if (name == "mojo:mus") |
94 return base::WrapUnique(new mus::MusApp); | 95 return base::WrapUnique(new mus::MusApp); |
95 if (name == "mojo:quick_launch") | 96 if (name == "mojo:quick_launch") |
96 return base::WrapUnique(new mash::quick_launch::QuickLaunchApplication); | 97 return base::WrapUnique(new mash::quick_launch::QuickLaunchApplication); |
97 if (name == "mojo:task_viewer") | 98 if (name == "mojo:task_viewer") |
98 return base::WrapUnique(new mash::task_viewer::TaskViewer); | 99 return base::WrapUnique(new mash::task_viewer::TaskViewer); |
| 100 if (name == "mojo:touch") |
| 101 return base::WrapUnique(new mash::touch::TouchHudApplication); |
99 #if defined(OS_LINUX) | 102 #if defined(OS_LINUX) |
100 if (name == "mojo:font_service") | 103 if (name == "mojo:font_service") |
101 return base::WrapUnique(new font_service::FontServiceApp); | 104 return base::WrapUnique(new font_service::FontServiceApp); |
102 #endif | 105 #endif |
103 if (name == "mojo:app_driver") { | 106 if (name == "mojo:app_driver") { |
104 return base::WrapUnique(new mash::app_driver::AppDriver()); | 107 return base::WrapUnique(new mash::app_driver::AppDriver()); |
105 } | 108 } |
106 return nullptr; | 109 return nullptr; |
107 } | 110 } |
108 | 111 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 std::unique_ptr<base::MessageLoop> message_loop; | 231 std::unique_ptr<base::MessageLoop> message_loop; |
229 #if defined(OS_LINUX) | 232 #if defined(OS_LINUX) |
230 base::AtExitManager exit_manager; | 233 base::AtExitManager exit_manager; |
231 #endif | 234 #endif |
232 if (!IsChild()) | 235 if (!IsChild()) |
233 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); | 236 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); |
234 MashRunner mash_runner; | 237 MashRunner mash_runner; |
235 mash_runner.Run(); | 238 mash_runner.Run(); |
236 return 0; | 239 return 0; |
237 } | 240 } |
OLD | NEW |