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