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 "ash/common/mojo_interface_factory.h" | 5 #include "ash/common/mojo_interface_factory.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/common/accelerators/accelerator_controller.h" | 9 #include "ash/common/accelerators/accelerator_controller.h" |
10 #include "ash/common/cast_config_controller.h" | 10 #include "ash/common/cast_config_controller.h" |
11 #include "ash/common/media_controller.h" | 11 #include "ash/common/media_controller.h" |
12 #include "ash/common/new_window_controller.h" | 12 #include "ash/common/new_window_controller.h" |
13 #include "ash/common/session/session_controller.h" | 13 #include "ash/common/session/session_controller.h" |
14 #include "ash/common/shelf/shelf_controller.h" | 14 #include "ash/common/shelf/shelf_controller.h" |
15 #include "ash/common/shell_delegate.h" | 15 #include "ash/common/shell_delegate.h" |
16 #include "ash/common/shutdown_controller.h" | 16 #include "ash/common/shutdown_controller.h" |
17 #include "ash/common/system/chromeos/network/vpn_list.h" | 17 #include "ash/common/system/chromeos/network/vpn_list.h" |
18 #include "ash/common/system/locale/locale_notification_controller.h" | 18 #include "ash/common/system/locale/locale_notification_controller.h" |
19 #include "ash/common/system/tray/system_tray_controller.h" | 19 #include "ash/common/system/tray/system_tray_controller.h" |
20 #include "ash/common/wallpaper/wallpaper_controller.h" | 20 #include "ash/common/wallpaper/wallpaper_controller.h" |
21 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 21 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" |
22 #include "ash/shell.h" | 22 #include "ash/shell.h" |
23 #include "base/bind.h" | 23 #include "base/bind.h" |
24 #include "services/service_manager/public/cpp/interface_registry.h" | 24 #include "services/service_manager/public/cpp/binder_registry.h" |
25 #include "ui/app_list/presenter/app_list.h" | 25 #include "ui/app_list/presenter/app_list.h" |
26 | 26 |
27 namespace ash { | 27 namespace ash { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 void BindAcceleratorControllerRequestOnMainThread( | 31 void BindAcceleratorControllerRequestOnMainThread( |
32 mojom::AcceleratorControllerRequest request) { | 32 mojom::AcceleratorControllerRequest request) { |
33 Shell::Get()->accelerator_controller()->BindRequest(std::move(request)); | 33 Shell::Get()->accelerator_controller()->BindRequest(std::move(request)); |
34 } | 34 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 void BindWallpaperRequestOnMainThread( | 86 void BindWallpaperRequestOnMainThread( |
87 mojom::WallpaperControllerRequest request) { | 87 mojom::WallpaperControllerRequest request) { |
88 Shell::Get()->wallpaper_controller()->BindRequest(std::move(request)); | 88 Shell::Get()->wallpaper_controller()->BindRequest(std::move(request)); |
89 } | 89 } |
90 | 90 |
91 } // namespace | 91 } // namespace |
92 | 92 |
93 namespace mojo_interface_factory { | 93 namespace mojo_interface_factory { |
94 | 94 |
95 void RegisterInterfaces( | 95 void RegisterInterfaces( |
96 service_manager::InterfaceRegistry* registry, | 96 service_manager::BinderRegistry* registry, |
97 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) { | 97 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) { |
98 registry->AddInterface( | 98 registry->AddInterface( |
99 base::Bind(&BindAcceleratorControllerRequestOnMainThread), | 99 base::Bind(&BindAcceleratorControllerRequestOnMainThread), |
100 main_thread_task_runner); | 100 main_thread_task_runner); |
101 registry->AddInterface(base::Bind(&BindAppListRequestOnMainThread), | 101 registry->AddInterface(base::Bind(&BindAppListRequestOnMainThread), |
102 main_thread_task_runner); | 102 main_thread_task_runner); |
103 registry->AddInterface(base::Bind(&BindCastConfigOnMainThread), | 103 registry->AddInterface(base::Bind(&BindCastConfigOnMainThread), |
104 main_thread_task_runner); | 104 main_thread_task_runner); |
105 registry->AddInterface( | 105 registry->AddInterface( |
106 base::Bind(&BindLocaleNotificationControllerOnMainThread), | 106 base::Bind(&BindLocaleNotificationControllerOnMainThread), |
(...skipping 15 matching lines...) Expand all Loading... |
122 main_thread_task_runner); | 122 main_thread_task_runner); |
123 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), | 123 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), |
124 main_thread_task_runner); | 124 main_thread_task_runner); |
125 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), | 125 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), |
126 main_thread_task_runner); | 126 main_thread_task_runner); |
127 } | 127 } |
128 | 128 |
129 } // namespace mojo_interface_factory | 129 } // namespace mojo_interface_factory |
130 | 130 |
131 } // namespace ash | 131 } // namespace ash |
OLD | NEW |