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" | |
9 #include "ash/touch_hud/mus/touch_hud_application.h" | 8 #include "ash/touch_hud/mus/touch_hud_application.h" |
10 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
11 #include "base/bind.h" | 10 #include "base/bind.h" |
12 #include "base/command_line.h" | 11 #include "base/command_line.h" |
13 #include "base/debug/debugger.h" | 12 #include "base/debug/debugger.h" |
14 #include "base/i18n/icu_util.h" | 13 #include "base/i18n/icu_util.h" |
15 #include "base/logging.h" | 14 #include "base/logging.h" |
16 #include "base/memory/ptr_util.h" | 15 #include "base/memory/ptr_util.h" |
17 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
18 #include "base/process/launch.h" | 17 #include "base/process/launch.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 return; | 78 return; |
80 } | 79 } |
81 LOG(ERROR) << "unknown name " << mojo_name; | 80 LOG(ERROR) << "unknown name " << mojo_name; |
82 NOTREACHED(); | 81 NOTREACHED(); |
83 } | 82 } |
84 | 83 |
85 private: | 84 private: |
86 // TODO(sky): move this into mash. | 85 // TODO(sky): move this into mash. |
87 std::unique_ptr<shell::Service> CreateService( | 86 std::unique_ptr<shell::Service> CreateService( |
88 const std::string& name) { | 87 const std::string& name) { |
89 if (name == "mojo:ash_sysui") | |
90 return base::WrapUnique(new ash::sysui::SysUIApplication); | |
91 if (name == "mojo:ash") | 88 if (name == "mojo:ash") |
92 return base::WrapUnique(new ash::mus::WindowManagerApplication); | 89 return base::WrapUnique(new ash::mus::WindowManagerApplication); |
93 if (name == "mojo:touch_hud") | 90 if (name == "mojo:touch_hud") |
94 return base::WrapUnique(new ash::touch_hud::TouchHudApplication); | 91 return base::WrapUnique(new ash::touch_hud::TouchHudApplication); |
95 if (name == "mojo:mash_session") | 92 if (name == "mojo:mash_session") |
96 return base::WrapUnique(new mash::session::Session); | 93 return base::WrapUnique(new mash::session::Session); |
97 if (name == "mojo:ui") | 94 if (name == "mojo:ui") |
98 return base::WrapUnique(new ui::Service); | 95 return base::WrapUnique(new ui::Service); |
99 if (name == "mojo:quick_launch") | 96 if (name == "mojo:quick_launch") |
100 return base::WrapUnique(new mash::quick_launch::QuickLaunch); | 97 return base::WrapUnique(new mash::quick_launch::QuickLaunch); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 std::unique_ptr<base::MessageLoop> message_loop; | 228 std::unique_ptr<base::MessageLoop> message_loop; |
232 #if defined(OS_LINUX) | 229 #if defined(OS_LINUX) |
233 base::AtExitManager exit_manager; | 230 base::AtExitManager exit_manager; |
234 #endif | 231 #endif |
235 if (!IsChild()) | 232 if (!IsChild()) |
236 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); | 233 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); |
237 MashRunner mash_runner; | 234 MashRunner mash_runner; |
238 mash_runner.Run(); | 235 mash_runner.Run(); |
239 return 0; | 236 return 0; |
240 } | 237 } |
OLD | NEW |