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" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 LOG(ERROR) << "unknown name " << mojo_name; | 79 LOG(ERROR) << "unknown name " << mojo_name; |
80 NOTREACHED(); | 80 NOTREACHED(); |
81 } | 81 } |
82 | 82 |
83 private: | 83 private: |
84 // TODO(sky): move this into mash. | 84 // TODO(sky): move this into mash. |
85 std::unique_ptr<shell::ShellClient> CreateShellClient( | 85 std::unique_ptr<shell::ShellClient> CreateShellClient( |
86 const std::string& name) { | 86 const std::string& name) { |
87 if (name == "mojo:ash_sysui") | 87 if (name == "mojo:ash_sysui") |
88 return base::WrapUnique(new ash::sysui::SysUIApplication); | 88 return base::WrapUnique(new ash::sysui::SysUIApplication); |
89 if (name == "mojo:desktop_wm") | 89 if (name == "mojo:ash") |
90 return base::WrapUnique(new ash::mus::WindowManagerApplication); | 90 return base::WrapUnique(new ash::mus::WindowManagerApplication); |
91 if (name == "mojo:mash_session") | 91 if (name == "mojo:mash_session") |
92 return base::WrapUnique(new mash::session::Session); | 92 return base::WrapUnique(new mash::session::Session); |
93 if (name == "mojo:mus") | 93 if (name == "mojo:mus") |
94 return base::WrapUnique(new mus::MusApp); | 94 return base::WrapUnique(new mus::MusApp); |
95 if (name == "mojo:quick_launch") | 95 if (name == "mojo:quick_launch") |
96 return base::WrapUnique(new mash::quick_launch::QuickLaunchApplication); | 96 return base::WrapUnique(new mash::quick_launch::QuickLaunchApplication); |
97 if (name == "mojo:task_viewer") | 97 if (name == "mojo:task_viewer") |
98 return base::WrapUnique(new mash::task_viewer::TaskViewer); | 98 return base::WrapUnique(new mash::task_viewer::TaskViewer); |
99 #if defined(OS_LINUX) | 99 #if defined(OS_LINUX) |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 std::unique_ptr<base::MessageLoop> message_loop; | 228 std::unique_ptr<base::MessageLoop> message_loop; |
229 #if defined(OS_LINUX) | 229 #if defined(OS_LINUX) |
230 base::AtExitManager exit_manager; | 230 base::AtExitManager exit_manager; |
231 #endif | 231 #endif |
232 if (!IsChild()) | 232 if (!IsChild()) |
233 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); | 233 message_loop.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); |
234 MashRunner mash_runner; | 234 MashRunner mash_runner; |
235 mash_runner.Run(); | 235 mash_runner.Run(); |
236 return 0; | 236 return 0; |
237 } | 237 } |
OLD | NEW |