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

Side by Side Diff: ash/common/mojo_interface_factory.cc

Issue 2736573002: chromeos: Move files in //ash/common to //ash, part 2 (Closed)
Patch Set: Created 3 years, 9 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 | « ash/common/mojo_interface_factory.h ('k') | ash/common/multi_profile_uma.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/common/mojo_interface_factory.h"
6
7 #include <utility>
8
9 #include "ash/common/accelerators/accelerator_controller.h"
10 #include "ash/common/cast_config_controller.h"
11 #include "ash/common/media_controller.h"
12 #include "ash/common/new_window_controller.h"
13 #include "ash/common/session/session_controller.h"
14 #include "ash/common/shelf/shelf_controller.h"
15 #include "ash/common/shell_delegate.h"
16 #include "ash/common/shutdown_controller.h"
17 #include "ash/common/wallpaper/wallpaper_controller.h"
18 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
19 #include "ash/common/wm_shell.h"
20 #include "ash/system/locale/locale_notification_controller.h"
21 #include "ash/system/network/vpn_list.h"
22 #include "ash/system/tray/system_tray_controller.h"
23 #include "base/bind.h"
24 #include "services/service_manager/public/cpp/interface_registry.h"
25 #include "ui/app_list/presenter/app_list.h"
26
27 namespace ash {
28
29 namespace {
30
31 void BindAcceleratorControllerRequestOnMainThread(
32 mojom::AcceleratorControllerRequest request) {
33 WmShell::Get()->accelerator_controller()->BindRequest(std::move(request));
34 }
35
36 void BindAppListRequestOnMainThread(app_list::mojom::AppListRequest request) {
37 WmShell::Get()->app_list()->BindRequest(std::move(request));
38 }
39
40 void BindCastConfigOnMainThread(mojom::CastConfigRequest request) {
41 WmShell::Get()->cast_config()->BindRequest(std::move(request));
42 }
43
44 void BindLocaleNotificationControllerOnMainThread(
45 mojom::LocaleNotificationControllerRequest request) {
46 WmShell::Get()->locale_notification_controller()->BindRequest(
47 std::move(request));
48 }
49
50 void BindMediaControllerRequestOnMainThread(
51 mojom::MediaControllerRequest request) {
52 WmShell::Get()->media_controller()->BindRequest(std::move(request));
53 }
54
55 void BindNewWindowControllerRequestOnMainThread(
56 mojom::NewWindowControllerRequest request) {
57 WmShell::Get()->new_window_controller()->BindRequest(std::move(request));
58 }
59
60 void BindSessionControllerRequestOnMainThread(
61 mojom::SessionControllerRequest request) {
62 WmShell::Get()->session_controller()->BindRequest(std::move(request));
63 }
64
65 void BindShelfRequestOnMainThread(mojom::ShelfControllerRequest request) {
66 WmShell::Get()->shelf_controller()->BindRequest(std::move(request));
67 }
68
69 void BindShutdownControllerRequestOnMainThread(
70 mojom::ShutdownControllerRequest request) {
71 WmShell::Get()->shutdown_controller()->BindRequest(std::move(request));
72 }
73
74 void BindSystemTrayRequestOnMainThread(mojom::SystemTrayRequest request) {
75 WmShell::Get()->system_tray_controller()->BindRequest(std::move(request));
76 }
77
78 void BindTouchViewRequestOnMainThread(mojom::TouchViewManagerRequest request) {
79 WmShell::Get()->maximize_mode_controller()->BindRequest(std::move(request));
80 }
81
82 void BindVpnListRequestOnMainThread(mojom::VpnListRequest request) {
83 WmShell::Get()->vpn_list()->BindRequest(std::move(request));
84 }
85
86 void BindWallpaperRequestOnMainThread(
87 mojom::WallpaperControllerRequest request) {
88 WmShell::Get()->wallpaper_controller()->BindRequest(std::move(request));
89 }
90
91 } // namespace
92
93 namespace mojo_interface_factory {
94
95 void RegisterInterfaces(
96 service_manager::InterfaceRegistry* registry,
97 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) {
98 registry->AddInterface(
99 base::Bind(&BindAcceleratorControllerRequestOnMainThread),
100 main_thread_task_runner);
101 registry->AddInterface(base::Bind(&BindAppListRequestOnMainThread),
102 main_thread_task_runner);
103 registry->AddInterface(base::Bind(&BindCastConfigOnMainThread),
104 main_thread_task_runner);
105 registry->AddInterface(
106 base::Bind(&BindLocaleNotificationControllerOnMainThread),
107 main_thread_task_runner);
108 registry->AddInterface(base::Bind(&BindMediaControllerRequestOnMainThread),
109 main_thread_task_runner);
110 registry->AddInterface(
111 base::Bind(&BindNewWindowControllerRequestOnMainThread),
112 main_thread_task_runner);
113 registry->AddInterface(base::Bind(&BindSessionControllerRequestOnMainThread),
114 main_thread_task_runner);
115 registry->AddInterface(base::Bind(&BindShelfRequestOnMainThread),
116 main_thread_task_runner);
117 registry->AddInterface(base::Bind(&BindShutdownControllerRequestOnMainThread),
118 main_thread_task_runner);
119 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread),
120 main_thread_task_runner);
121 registry->AddInterface(base::Bind(&BindTouchViewRequestOnMainThread),
122 main_thread_task_runner);
123 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread),
124 main_thread_task_runner);
125 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread),
126 main_thread_task_runner);
127 }
128
129 } // namespace mojo_interface_factory
130
131 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/mojo_interface_factory.h ('k') | ash/common/multi_profile_uma.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698