| 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/locale/locale_notification_controller.h" | 18 #include "ash/common/system/locale/locale_notification_controller.h" |
| 18 #include "ash/common/system/tray/system_tray_controller.h" | 19 #include "ash/common/system/tray/system_tray_controller.h" |
| 19 #include "ash/common/wallpaper/wallpaper_controller.h" | 20 #include "ash/common/wallpaper/wallpaper_controller.h" |
| 20 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 21 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" |
| 21 #include "ash/common/wm_shell.h" | 22 #include "ash/common/wm_shell.h" |
| 22 #include "base/bind.h" | 23 #include "base/bind.h" |
| 23 #include "services/service_manager/public/cpp/interface_registry.h" | 24 #include "services/service_manager/public/cpp/interface_registry.h" |
| 24 #include "ui/app_list/presenter/app_list.h" | 25 #include "ui/app_list/presenter/app_list.h" |
| 25 | 26 |
| 26 #if defined(OS_CHROMEOS) | |
| 27 #include "ash/common/system/chromeos/network/vpn_list.h" | |
| 28 #endif | |
| 29 | |
| 30 namespace ash { | 27 namespace ash { |
| 31 | 28 |
| 32 namespace { | 29 namespace { |
| 33 | 30 |
| 34 void BindAcceleratorControllerRequestOnMainThread( | 31 void BindAcceleratorControllerRequestOnMainThread( |
| 35 mojom::AcceleratorControllerRequest request) { | 32 mojom::AcceleratorControllerRequest request) { |
| 36 WmShell::Get()->accelerator_controller()->BindRequest(std::move(request)); | 33 WmShell::Get()->accelerator_controller()->BindRequest(std::move(request)); |
| 37 } | 34 } |
| 38 | 35 |
| 39 void BindAppListRequestOnMainThread(app_list::mojom::AppListRequest request) { | 36 void BindAppListRequestOnMainThread(app_list::mojom::AppListRequest request) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 72 } |
| 76 | 73 |
| 77 void BindSystemTrayRequestOnMainThread(mojom::SystemTrayRequest request) { | 74 void BindSystemTrayRequestOnMainThread(mojom::SystemTrayRequest request) { |
| 78 WmShell::Get()->system_tray_controller()->BindRequest(std::move(request)); | 75 WmShell::Get()->system_tray_controller()->BindRequest(std::move(request)); |
| 79 } | 76 } |
| 80 | 77 |
| 81 void BindTouchViewRequestOnMainThread(mojom::TouchViewManagerRequest request) { | 78 void BindTouchViewRequestOnMainThread(mojom::TouchViewManagerRequest request) { |
| 82 WmShell::Get()->maximize_mode_controller()->BindRequest(std::move(request)); | 79 WmShell::Get()->maximize_mode_controller()->BindRequest(std::move(request)); |
| 83 } | 80 } |
| 84 | 81 |
| 85 #if defined(OS_CHROMEOS) | |
| 86 void BindVpnListRequestOnMainThread(mojom::VpnListRequest request) { | 82 void BindVpnListRequestOnMainThread(mojom::VpnListRequest request) { |
| 87 WmShell::Get()->vpn_list()->BindRequest(std::move(request)); | 83 WmShell::Get()->vpn_list()->BindRequest(std::move(request)); |
| 88 } | 84 } |
| 89 #endif | |
| 90 | 85 |
| 91 void BindWallpaperRequestOnMainThread( | 86 void BindWallpaperRequestOnMainThread( |
| 92 mojom::WallpaperControllerRequest request) { | 87 mojom::WallpaperControllerRequest request) { |
| 93 WmShell::Get()->wallpaper_controller()->BindRequest(std::move(request)); | 88 WmShell::Get()->wallpaper_controller()->BindRequest(std::move(request)); |
| 94 } | 89 } |
| 95 | 90 |
| 96 } // namespace | 91 } // namespace |
| 97 | 92 |
| 98 namespace mojo_interface_factory { | 93 namespace mojo_interface_factory { |
| 99 | 94 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 118 registry->AddInterface(base::Bind(&BindSessionControllerRequestOnMainThread), | 113 registry->AddInterface(base::Bind(&BindSessionControllerRequestOnMainThread), |
| 119 main_thread_task_runner); | 114 main_thread_task_runner); |
| 120 registry->AddInterface(base::Bind(&BindShelfRequestOnMainThread), | 115 registry->AddInterface(base::Bind(&BindShelfRequestOnMainThread), |
| 121 main_thread_task_runner); | 116 main_thread_task_runner); |
| 122 registry->AddInterface(base::Bind(&BindShutdownControllerRequestOnMainThread), | 117 registry->AddInterface(base::Bind(&BindShutdownControllerRequestOnMainThread), |
| 123 main_thread_task_runner); | 118 main_thread_task_runner); |
| 124 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread), | 119 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread), |
| 125 main_thread_task_runner); | 120 main_thread_task_runner); |
| 126 registry->AddInterface(base::Bind(&BindTouchViewRequestOnMainThread), | 121 registry->AddInterface(base::Bind(&BindTouchViewRequestOnMainThread), |
| 127 main_thread_task_runner); | 122 main_thread_task_runner); |
| 128 #if defined(OS_CHROMEOS) | |
| 129 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), | 123 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), |
| 130 main_thread_task_runner); | 124 main_thread_task_runner); |
| 131 #endif | |
| 132 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), | 125 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), |
| 133 main_thread_task_runner); | 126 main_thread_task_runner); |
| 134 } | 127 } |
| 135 | 128 |
| 136 } // namespace mojo_interface_factory | 129 } // namespace mojo_interface_factory |
| 137 | 130 |
| 138 } // namespace ash | 131 } // namespace ash |
| OLD | NEW |