| 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/cast_config_controller.h" |
| 9 #include "ash/common/shelf/shelf_controller.h" | 10 #include "ash/common/shelf/shelf_controller.h" |
| 10 #include "ash/common/shutdown_controller.h" | 11 #include "ash/common/shutdown_controller.h" |
| 11 #include "ash/common/system/locale/locale_notification_controller.h" | 12 #include "ash/common/system/locale/locale_notification_controller.h" |
| 12 #include "ash/common/system/tray/system_tray_controller.h" | 13 #include "ash/common/system/tray/system_tray_controller.h" |
| 13 #include "ash/common/wallpaper/wallpaper_controller.h" | 14 #include "ash/common/wallpaper/wallpaper_controller.h" |
| 14 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 15 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" |
| 15 #include "ash/common/wm_shell.h" | 16 #include "ash/common/wm_shell.h" |
| 16 #include "base/bind.h" | 17 #include "base/bind.h" |
| 17 #include "services/service_manager/public/cpp/interface_registry.h" | 18 #include "services/service_manager/public/cpp/interface_registry.h" |
| 18 | 19 |
| 19 #if defined(OS_CHROMEOS) | 20 #if defined(OS_CHROMEOS) |
| 20 #include "ash/common/system/chromeos/network/vpn_list.h" | 21 #include "ash/common/system/chromeos/network/vpn_list.h" |
| 21 #endif | 22 #endif |
| 22 | 23 |
| 23 namespace ash { | 24 namespace ash { |
| 24 | 25 |
| 25 namespace { | 26 namespace { |
| 26 | 27 |
| 28 void BindCastConfigOnMainThread(mojom::CastConfigRequest request) { |
| 29 WmShell::Get()->cast_config()->BindRequest(std::move(request)); |
| 30 } |
| 31 |
| 27 void BindLocaleNotificationControllerOnMainThread( | 32 void BindLocaleNotificationControllerOnMainThread( |
| 28 mojom::LocaleNotificationControllerRequest request) { | 33 mojom::LocaleNotificationControllerRequest request) { |
| 29 WmShell::Get()->locale_notification_controller()->BindRequest( | 34 WmShell::Get()->locale_notification_controller()->BindRequest( |
| 30 std::move(request)); | 35 std::move(request)); |
| 31 } | 36 } |
| 32 | 37 |
| 33 void BindShelfRequestOnMainThread(mojom::ShelfControllerRequest request) { | 38 void BindShelfRequestOnMainThread(mojom::ShelfControllerRequest request) { |
| 34 WmShell::Get()->shelf_controller()->BindRequest(std::move(request)); | 39 WmShell::Get()->shelf_controller()->BindRequest(std::move(request)); |
| 35 } | 40 } |
| 36 | 41 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 58 WmShell::Get()->wallpaper_controller()->BindRequest(std::move(request)); | 63 WmShell::Get()->wallpaper_controller()->BindRequest(std::move(request)); |
| 59 } | 64 } |
| 60 | 65 |
| 61 } // namespace | 66 } // namespace |
| 62 | 67 |
| 63 namespace mojo_interface_factory { | 68 namespace mojo_interface_factory { |
| 64 | 69 |
| 65 void RegisterInterfaces( | 70 void RegisterInterfaces( |
| 66 service_manager::InterfaceRegistry* registry, | 71 service_manager::InterfaceRegistry* registry, |
| 67 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) { | 72 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) { |
| 73 registry->AddInterface(base::Bind(&BindCastConfigOnMainThread), |
| 74 main_thread_task_runner); |
| 68 registry->AddInterface( | 75 registry->AddInterface( |
| 69 base::Bind(&BindLocaleNotificationControllerOnMainThread), | 76 base::Bind(&BindLocaleNotificationControllerOnMainThread), |
| 70 main_thread_task_runner); | 77 main_thread_task_runner); |
| 71 registry->AddInterface(base::Bind(&BindShelfRequestOnMainThread), | 78 registry->AddInterface(base::Bind(&BindShelfRequestOnMainThread), |
| 72 main_thread_task_runner); | 79 main_thread_task_runner); |
| 73 registry->AddInterface(base::Bind(&BindShutdownControllerRequestOnMainThread), | 80 registry->AddInterface(base::Bind(&BindShutdownControllerRequestOnMainThread), |
| 74 main_thread_task_runner); | 81 main_thread_task_runner); |
| 75 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread), | 82 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread), |
| 76 main_thread_task_runner); | 83 main_thread_task_runner); |
| 77 registry->AddInterface(base::Bind(&BindTouchViewRequestOnMainThread), | 84 registry->AddInterface(base::Bind(&BindTouchViewRequestOnMainThread), |
| 78 main_thread_task_runner); | 85 main_thread_task_runner); |
| 79 #if defined(OS_CHROMEOS) | 86 #if defined(OS_CHROMEOS) |
| 80 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), | 87 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), |
| 81 main_thread_task_runner); | 88 main_thread_task_runner); |
| 82 #endif | 89 #endif |
| 83 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), | 90 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), |
| 84 main_thread_task_runner); | 91 main_thread_task_runner); |
| 85 } | 92 } |
| 86 | 93 |
| 87 } // namespace mojo_interface_factory | 94 } // namespace mojo_interface_factory |
| 88 | 95 |
| 89 } // namespace ash | 96 } // namespace ash |
| OLD | NEW |