| 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/action_handler/action_handler_state_controller.h" |
| 10 #include "ash/cast_config_controller.h" | 11 #include "ash/cast_config_controller.h" |
| 11 #include "ash/media_controller.h" | 12 #include "ash/media_controller.h" |
| 12 #include "ash/new_window_controller.h" | 13 #include "ash/new_window_controller.h" |
| 13 #include "ash/session/session_controller.h" | 14 #include "ash/session/session_controller.h" |
| 14 #include "ash/shelf/shelf_controller.h" | 15 #include "ash/shelf/shelf_controller.h" |
| 15 #include "ash/shell.h" | 16 #include "ash/shell.h" |
| 16 #include "ash/shell_delegate.h" | 17 #include "ash/shell_delegate.h" |
| 17 #include "ash/shutdown_controller.h" | 18 #include "ash/shutdown_controller.h" |
| 18 #include "ash/system/locale/locale_notification_controller.h" | 19 #include "ash/system/locale/locale_notification_controller.h" |
| 19 #include "ash/system/network/vpn_list.h" | 20 #include "ash/system/network/vpn_list.h" |
| 20 #include "ash/system/tray/system_tray_controller.h" | 21 #include "ash/system/tray/system_tray_controller.h" |
| 21 #include "ash/wallpaper/wallpaper_controller.h" | 22 #include "ash/wallpaper/wallpaper_controller.h" |
| 22 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 23 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 23 #include "base/bind.h" | 24 #include "base/bind.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( |
| 32 mojom::AcceleratorControllerRequest request) { | 33 mojom::AcceleratorControllerRequest request) { |
| 33 Shell::Get()->accelerator_controller()->BindRequest(std::move(request)); | 34 Shell::Get()->accelerator_controller()->BindRequest(std::move(request)); |
| 34 } | 35 } |
| 35 | 36 |
| 37 void BindActionHandlerStateControllerRequestOnMainThread( |
| 38 mojom::ActionHandlerStateControllerRequest request) { |
| 39 Shell::Get()->action_handler_state_controller()->BindRequest( |
| 40 std::move(request)); |
| 41 } |
| 42 |
| 36 void BindAppListRequestOnMainThread(app_list::mojom::AppListRequest request) { | 43 void BindAppListRequestOnMainThread(app_list::mojom::AppListRequest request) { |
| 37 Shell::Get()->app_list()->BindRequest(std::move(request)); | 44 Shell::Get()->app_list()->BindRequest(std::move(request)); |
| 38 } | 45 } |
| 39 | 46 |
| 40 void BindCastConfigOnMainThread(mojom::CastConfigRequest request) { | 47 void BindCastConfigOnMainThread(mojom::CastConfigRequest request) { |
| 41 Shell::Get()->cast_config()->BindRequest(std::move(request)); | 48 Shell::Get()->cast_config()->BindRequest(std::move(request)); |
| 42 } | 49 } |
| 43 | 50 |
| 44 void BindLocaleNotificationControllerOnMainThread( | 51 void BindLocaleNotificationControllerOnMainThread( |
| 45 mojom::LocaleNotificationControllerRequest request) { | 52 mojom::LocaleNotificationControllerRequest request) { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 } // namespace | 98 } // namespace |
| 92 | 99 |
| 93 namespace mojo_interface_factory { | 100 namespace mojo_interface_factory { |
| 94 | 101 |
| 95 void RegisterInterfaces( | 102 void RegisterInterfaces( |
| 96 service_manager::BinderRegistry* registry, | 103 service_manager::BinderRegistry* registry, |
| 97 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) { | 104 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) { |
| 98 registry->AddInterface( | 105 registry->AddInterface( |
| 99 base::Bind(&BindAcceleratorControllerRequestOnMainThread), | 106 base::Bind(&BindAcceleratorControllerRequestOnMainThread), |
| 100 main_thread_task_runner); | 107 main_thread_task_runner); |
| 108 registry->AddInterface( |
| 109 base::Bind(&BindActionHandlerStateControllerRequestOnMainThread), |
| 110 main_thread_task_runner); |
| 101 registry->AddInterface(base::Bind(&BindAppListRequestOnMainThread), | 111 registry->AddInterface(base::Bind(&BindAppListRequestOnMainThread), |
| 102 main_thread_task_runner); | 112 main_thread_task_runner); |
| 103 registry->AddInterface(base::Bind(&BindCastConfigOnMainThread), | 113 registry->AddInterface(base::Bind(&BindCastConfigOnMainThread), |
| 104 main_thread_task_runner); | 114 main_thread_task_runner); |
| 105 registry->AddInterface( | 115 registry->AddInterface( |
| 106 base::Bind(&BindLocaleNotificationControllerOnMainThread), | 116 base::Bind(&BindLocaleNotificationControllerOnMainThread), |
| 107 main_thread_task_runner); | 117 main_thread_task_runner); |
| 108 registry->AddInterface(base::Bind(&BindMediaControllerRequestOnMainThread), | 118 registry->AddInterface(base::Bind(&BindMediaControllerRequestOnMainThread), |
| 109 main_thread_task_runner); | 119 main_thread_task_runner); |
| 110 registry->AddInterface( | 120 registry->AddInterface( |
| (...skipping 11 matching lines...) Expand all Loading... |
| 122 main_thread_task_runner); | 132 main_thread_task_runner); |
| 123 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), | 133 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), |
| 124 main_thread_task_runner); | 134 main_thread_task_runner); |
| 125 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), | 135 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), |
| 126 main_thread_task_runner); | 136 main_thread_task_runner); |
| 127 } | 137 } |
| 128 | 138 |
| 129 } // namespace mojo_interface_factory | 139 } // namespace mojo_interface_factory |
| 130 | 140 |
| 131 } // namespace ash | 141 } // namespace ash |
| OLD | NEW |