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/mojo_interface_factory.h" | 5 #include "ash/mojo_interface_factory.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/accelerators/accelerator_controller.h" | 9 #include "ash/accelerators/accelerator_controller.h" |
10 #include "ash/cast_config_controller.h" | 10 #include "ash/cast_config_controller.h" |
11 #include "ash/media_controller.h" | 11 #include "ash/media_controller.h" |
12 #include "ash/new_window_controller.h" | 12 #include "ash/new_window_controller.h" |
13 #include "ash/session/session_controller.h" | 13 #include "ash/session/session_controller.h" |
14 #include "ash/shelf/shelf_controller.h" | 14 #include "ash/shelf/shelf_controller.h" |
15 #include "ash/shell.h" | 15 #include "ash/shell.h" |
16 #include "ash/shell_delegate.h" | 16 #include "ash/shell_delegate.h" |
17 #include "ash/shutdown_controller.h" | 17 #include "ash/shutdown_controller.h" |
18 #include "ash/system/locale/locale_notification_controller.h" | 18 #include "ash/system/locale/locale_notification_controller.h" |
19 #include "ash/system/network/vpn_list.h" | 19 #include "ash/system/network/vpn_list.h" |
20 #include "ash/system/tray/system_tray_controller.h" | 20 #include "ash/system/tray/system_tray_controller.h" |
21 #include "ash/wallpaper/wallpaper_controller.h" | 21 #include "ash/wallpaper/wallpaper_controller.h" |
22 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 22 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
23 #include "base/bind.h" | 23 #include "base/bind.h" |
| 24 #include "services/service_manager/public/cpp/bind_source_info.h" |
24 #include "services/service_manager/public/cpp/binder_registry.h" | 25 #include "services/service_manager/public/cpp/binder_registry.h" |
25 #include "ui/app_list/presenter/app_list.h" | 26 #include "ui/app_list/presenter/app_list.h" |
26 | 27 |
27 namespace ash { | 28 namespace ash { |
28 | 29 |
29 namespace { | 30 namespace { |
30 | 31 |
31 void BindAcceleratorControllerRequestOnMainThread( | 32 void BindAcceleratorControllerRequestOnMainThread( |
| 33 const service_manager::BindSourceInfo& source_info, |
32 mojom::AcceleratorControllerRequest request) { | 34 mojom::AcceleratorControllerRequest request) { |
33 Shell::Get()->accelerator_controller()->BindRequest(std::move(request)); | 35 Shell::Get()->accelerator_controller()->BindRequest(std::move(request)); |
34 } | 36 } |
35 | 37 |
36 void BindAppListRequestOnMainThread(app_list::mojom::AppListRequest request) { | 38 void BindAppListRequestOnMainThread( |
| 39 const service_manager::BindSourceInfo& source_info, |
| 40 app_list::mojom::AppListRequest request) { |
37 Shell::Get()->app_list()->BindRequest(std::move(request)); | 41 Shell::Get()->app_list()->BindRequest(std::move(request)); |
38 } | 42 } |
39 | 43 |
40 void BindCastConfigOnMainThread(mojom::CastConfigRequest request) { | 44 void BindCastConfigOnMainThread( |
| 45 const service_manager::BindSourceInfo& source_info, |
| 46 mojom::CastConfigRequest request) { |
41 Shell::Get()->cast_config()->BindRequest(std::move(request)); | 47 Shell::Get()->cast_config()->BindRequest(std::move(request)); |
42 } | 48 } |
43 | 49 |
44 void BindLocaleNotificationControllerOnMainThread( | 50 void BindLocaleNotificationControllerOnMainThread( |
| 51 const service_manager::BindSourceInfo& source_info, |
45 mojom::LocaleNotificationControllerRequest request) { | 52 mojom::LocaleNotificationControllerRequest request) { |
46 Shell::Get()->locale_notification_controller()->BindRequest( | 53 Shell::Get()->locale_notification_controller()->BindRequest( |
47 std::move(request)); | 54 std::move(request)); |
48 } | 55 } |
49 | 56 |
50 void BindMediaControllerRequestOnMainThread( | 57 void BindMediaControllerRequestOnMainThread( |
| 58 const service_manager::BindSourceInfo& source_info, |
51 mojom::MediaControllerRequest request) { | 59 mojom::MediaControllerRequest request) { |
52 Shell::Get()->media_controller()->BindRequest(std::move(request)); | 60 Shell::Get()->media_controller()->BindRequest(std::move(request)); |
53 } | 61 } |
54 | 62 |
55 void BindNewWindowControllerRequestOnMainThread( | 63 void BindNewWindowControllerRequestOnMainThread( |
| 64 const service_manager::BindSourceInfo& source_info, |
56 mojom::NewWindowControllerRequest request) { | 65 mojom::NewWindowControllerRequest request) { |
57 Shell::Get()->new_window_controller()->BindRequest(std::move(request)); | 66 Shell::Get()->new_window_controller()->BindRequest(std::move(request)); |
58 } | 67 } |
59 | 68 |
60 void BindSessionControllerRequestOnMainThread( | 69 void BindSessionControllerRequestOnMainThread( |
| 70 const service_manager::BindSourceInfo& source_info, |
61 mojom::SessionControllerRequest request) { | 71 mojom::SessionControllerRequest request) { |
62 Shell::Get()->session_controller()->BindRequest(std::move(request)); | 72 Shell::Get()->session_controller()->BindRequest(std::move(request)); |
63 } | 73 } |
64 | 74 |
65 void BindShelfRequestOnMainThread(mojom::ShelfControllerRequest request) { | 75 void BindShelfRequestOnMainThread( |
| 76 const service_manager::BindSourceInfo& source_info, |
| 77 mojom::ShelfControllerRequest request) { |
66 Shell::Get()->shelf_controller()->BindRequest(std::move(request)); | 78 Shell::Get()->shelf_controller()->BindRequest(std::move(request)); |
67 } | 79 } |
68 | 80 |
69 void BindShutdownControllerRequestOnMainThread( | 81 void BindShutdownControllerRequestOnMainThread( |
| 82 const service_manager::BindSourceInfo& source_info, |
70 mojom::ShutdownControllerRequest request) { | 83 mojom::ShutdownControllerRequest request) { |
71 Shell::Get()->shutdown_controller()->BindRequest(std::move(request)); | 84 Shell::Get()->shutdown_controller()->BindRequest(std::move(request)); |
72 } | 85 } |
73 | 86 |
74 void BindSystemTrayRequestOnMainThread(mojom::SystemTrayRequest request) { | 87 void BindSystemTrayRequestOnMainThread( |
| 88 const service_manager::BindSourceInfo& source_info, |
| 89 mojom::SystemTrayRequest request) { |
75 Shell::Get()->system_tray_controller()->BindRequest(std::move(request)); | 90 Shell::Get()->system_tray_controller()->BindRequest(std::move(request)); |
76 } | 91 } |
77 | 92 |
78 void BindTouchViewRequestOnMainThread(mojom::TouchViewManagerRequest request) { | 93 void BindTouchViewRequestOnMainThread( |
| 94 const service_manager::BindSourceInfo& source_info, |
| 95 mojom::TouchViewManagerRequest request) { |
79 Shell::Get()->maximize_mode_controller()->BindRequest(std::move(request)); | 96 Shell::Get()->maximize_mode_controller()->BindRequest(std::move(request)); |
80 } | 97 } |
81 | 98 |
82 void BindVpnListRequestOnMainThread(mojom::VpnListRequest request) { | 99 void BindVpnListRequestOnMainThread( |
| 100 const service_manager::BindSourceInfo& source_info, |
| 101 mojom::VpnListRequest request) { |
83 Shell::Get()->vpn_list()->BindRequest(std::move(request)); | 102 Shell::Get()->vpn_list()->BindRequest(std::move(request)); |
84 } | 103 } |
85 | 104 |
86 void BindWallpaperRequestOnMainThread( | 105 void BindWallpaperRequestOnMainThread( |
| 106 const service_manager::BindSourceInfo& source_info, |
87 mojom::WallpaperControllerRequest request) { | 107 mojom::WallpaperControllerRequest request) { |
88 Shell::Get()->wallpaper_controller()->BindRequest(std::move(request)); | 108 Shell::Get()->wallpaper_controller()->BindRequest(std::move(request)); |
89 } | 109 } |
90 | 110 |
91 } // namespace | 111 } // namespace |
92 | 112 |
93 namespace mojo_interface_factory { | 113 namespace mojo_interface_factory { |
94 | 114 |
95 void RegisterInterfaces( | 115 void RegisterInterfaces( |
96 service_manager::BinderRegistry* registry, | 116 service_manager::BinderRegistry* registry, |
(...skipping 25 matching lines...) Expand all Loading... |
122 main_thread_task_runner); | 142 main_thread_task_runner); |
123 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), | 143 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), |
124 main_thread_task_runner); | 144 main_thread_task_runner); |
125 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), | 145 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), |
126 main_thread_task_runner); | 146 main_thread_task_runner); |
127 } | 147 } |
128 | 148 |
129 } // namespace mojo_interface_factory | 149 } // namespace mojo_interface_factory |
130 | 150 |
131 } // namespace ash | 151 } // namespace ash |
OLD | NEW |