Chromium Code Reviews| 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 "ash/autoclick/mus/autoclick_application.h" | |
| 7 #include "ash/mus/window_manager_application.h" | 8 #include "ash/mus/window_manager_application.h" |
| 8 #include "ash/touch_hud/mus/touch_hud_application.h" | 9 #include "ash/touch_hud/mus/touch_hud_application.h" |
| 9 #include "mash/app_driver/app_driver.h" | 10 #include "mash/app_driver/app_driver.h" |
| 10 #include "mash/quick_launch/quick_launch.h" | 11 #include "mash/quick_launch/quick_launch.h" |
| 11 #include "mash/session/session.h" | 12 #include "mash/session/session.h" |
| 12 #include "mash/task_viewer/task_viewer.h" | 13 #include "mash/task_viewer/task_viewer.h" |
| 13 #include "services/shell/public/cpp/service_context.h" | 14 #include "services/shell/public/cpp/service_context.h" |
| 14 #include "services/ui/ime/test_ime_driver/test_ime_application.h" | 15 #include "services/ui/ime/test_ime_driver/test_ime_application.h" |
| 15 #include "services/ui/service.h" | 16 #include "services/ui/service.h" |
| 16 | 17 |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 47 service_->set_context(base::MakeUnique<shell::ServiceContext>( | 48 service_->set_context(base::MakeUnique<shell::ServiceContext>( |
| 48 service_.get(), std::move(request))); | 49 service_.get(), std::move(request))); |
| 49 return; | 50 return; |
| 50 } | 51 } |
| 51 LOG(ERROR) << "unknown name " << mojo_name; | 52 LOG(ERROR) << "unknown name " << mojo_name; |
| 52 NOTREACHED(); | 53 NOTREACHED(); |
| 53 } | 54 } |
| 54 | 55 |
| 55 std::unique_ptr<shell::Service> MashPackagedService::CreateService( | 56 std::unique_ptr<shell::Service> MashPackagedService::CreateService( |
| 56 const std::string& name) { | 57 const std::string& name) { |
| 57 if (name == "mojo:ash") | 58 if (name == "mojo:ash") |
|
sky
2016/09/12 17:28:09
Please add a comment to see header for details on
riajiang
2016/09/12 17:36:45
Done.
| |
| 58 return base::WrapUnique(new ash::mus::WindowManagerApplication); | 59 return base::WrapUnique(new ash::mus::WindowManagerApplication); |
| 60 if (name == "mojo:accessibility_autoclick") | |
| 61 return base::WrapUnique(new ash::autoclick::AutoclickApplication); | |
| 59 if (name == "mojo:touch_hud") | 62 if (name == "mojo:touch_hud") |
| 60 return base::WrapUnique(new ash::touch_hud::TouchHudApplication); | 63 return base::WrapUnique(new ash::touch_hud::TouchHudApplication); |
| 61 if (name == "mojo:mash_session") | 64 if (name == "mojo:mash_session") |
| 62 return base::WrapUnique(new mash::session::Session); | 65 return base::WrapUnique(new mash::session::Session); |
| 63 if (name == "mojo:ui") | 66 if (name == "mojo:ui") |
| 64 return base::WrapUnique(new ui::Service); | 67 return base::WrapUnique(new ui::Service); |
| 65 if (name == "mojo:quick_launch") | 68 if (name == "mojo:quick_launch") |
| 66 return base::WrapUnique(new mash::quick_launch::QuickLaunch); | 69 return base::WrapUnique(new mash::quick_launch::QuickLaunch); |
| 67 if (name == "mojo:task_viewer") | 70 if (name == "mojo:task_viewer") |
| 68 return base::WrapUnique(new mash::task_viewer::TaskViewer); | 71 return base::WrapUnique(new mash::task_viewer::TaskViewer); |
| 69 if (name == "mojo:test_ime_driver") | 72 if (name == "mojo:test_ime_driver") |
| 70 return base::WrapUnique(new ui::test::TestIMEApplication); | 73 return base::WrapUnique(new ui::test::TestIMEApplication); |
| 71 #if defined(OS_LINUX) | 74 #if defined(OS_LINUX) |
| 72 if (name == "mojo:font_service") | 75 if (name == "mojo:font_service") |
| 73 return base::WrapUnique(new font_service::FontServiceApp); | 76 return base::WrapUnique(new font_service::FontServiceApp); |
| 74 #endif | 77 #endif |
| 75 if (name == "mojo:app_driver") | 78 if (name == "mojo:app_driver") |
| 76 return base::WrapUnique(new mash::app_driver::AppDriver); | 79 return base::WrapUnique(new mash::app_driver::AppDriver); |
| 77 return nullptr; | 80 return nullptr; |
| 78 } | 81 } |
| 79 | 82 |
| 80 } // namespace mash | 83 } // namespace mash |
| OLD | NEW |