Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: mash/package/mash_packaged_service.cc

Issue 2316553003: mash: Add autoclick app. (Closed)
Patch Set: MouseEvent; if etc. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mash/package/mash_packaged_service.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 28 matching lines...) Expand all
45 service_ = CreateService(mojo_name); 46 service_ = CreateService(mojo_name);
46 if (service_) { 47 if (service_) {
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
56 // Please see header file for details on adding new services.
55 std::unique_ptr<shell::Service> MashPackagedService::CreateService( 57 std::unique_ptr<shell::Service> MashPackagedService::CreateService(
56 const std::string& name) { 58 const std::string& name) {
57 if (name == "mojo:ash") 59 if (name == "mojo:ash")
58 return base::WrapUnique(new ash::mus::WindowManagerApplication); 60 return base::WrapUnique(new ash::mus::WindowManagerApplication);
61 if (name == "mojo:accessibility_autoclick")
62 return base::WrapUnique(new ash::autoclick::AutoclickApplication);
59 if (name == "mojo:touch_hud") 63 if (name == "mojo:touch_hud")
60 return base::WrapUnique(new ash::touch_hud::TouchHudApplication); 64 return base::WrapUnique(new ash::touch_hud::TouchHudApplication);
61 if (name == "mojo:mash_session") 65 if (name == "mojo:mash_session")
62 return base::WrapUnique(new mash::session::Session); 66 return base::WrapUnique(new mash::session::Session);
63 if (name == "mojo:ui") 67 if (name == "mojo:ui")
64 return base::WrapUnique(new ui::Service); 68 return base::WrapUnique(new ui::Service);
65 if (name == "mojo:quick_launch") 69 if (name == "mojo:quick_launch")
66 return base::WrapUnique(new mash::quick_launch::QuickLaunch); 70 return base::WrapUnique(new mash::quick_launch::QuickLaunch);
67 if (name == "mojo:task_viewer") 71 if (name == "mojo:task_viewer")
68 return base::WrapUnique(new mash::task_viewer::TaskViewer); 72 return base::WrapUnique(new mash::task_viewer::TaskViewer);
69 if (name == "mojo:test_ime_driver") 73 if (name == "mojo:test_ime_driver")
70 return base::WrapUnique(new ui::test::TestIMEApplication); 74 return base::WrapUnique(new ui::test::TestIMEApplication);
71 #if defined(OS_LINUX) 75 #if defined(OS_LINUX)
72 if (name == "mojo:font_service") 76 if (name == "mojo:font_service")
73 return base::WrapUnique(new font_service::FontServiceApp); 77 return base::WrapUnique(new font_service::FontServiceApp);
74 #endif 78 #endif
75 if (name == "mojo:app_driver") 79 if (name == "mojo:app_driver")
76 return base::WrapUnique(new mash::app_driver::AppDriver); 80 return base::WrapUnique(new mash::app_driver::AppDriver);
77 return nullptr; 81 return nullptr;
78 } 82 }
79 83
80 } // namespace mash 84 } // namespace mash
OLDNEW
« no previous file with comments | « mash/package/mash_packaged_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698