Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: ash/common/mojo_interface_factory.cc

Issue 2552483002: mash: Have chrome set itself as a controller interface for changing volume (Closed)
Patch Set: comment Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/accelerators/accelerator_controller.cc ('k') | ash/mus/manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/cast_config_controller.h" 10 #include "ash/common/cast_config_controller.h"
10 #include "ash/common/shelf/shelf_controller.h" 11 #include "ash/common/shelf/shelf_controller.h"
11 #include "ash/common/shutdown_controller.h" 12 #include "ash/common/shutdown_controller.h"
12 #include "ash/common/system/locale/locale_notification_controller.h" 13 #include "ash/common/system/locale/locale_notification_controller.h"
13 #include "ash/common/system/tray/system_tray_controller.h" 14 #include "ash/common/system/tray/system_tray_controller.h"
14 #include "ash/common/wallpaper/wallpaper_controller.h" 15 #include "ash/common/wallpaper/wallpaper_controller.h"
15 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 16 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
16 #include "ash/common/wm_shell.h" 17 #include "ash/common/wm_shell.h"
17 #include "base/bind.h" 18 #include "base/bind.h"
18 #include "services/service_manager/public/cpp/interface_registry.h" 19 #include "services/service_manager/public/cpp/interface_registry.h"
19 20
20 #if defined(OS_CHROMEOS) 21 #if defined(OS_CHROMEOS)
21 #include "ash/common/system/chromeos/network/vpn_list.h" 22 #include "ash/common/system/chromeos/network/vpn_list.h"
22 #endif 23 #endif
23 24
24 namespace ash { 25 namespace ash {
25 26
26 namespace { 27 namespace {
27 28
29 void BindAcceleratorControllerRequestOnMainThread(
30 mojom::AcceleratorControllerRequest request) {
31 WmShell::Get()->accelerator_controller()->BindRequest(std::move(request));
32 }
33
28 void BindCastConfigOnMainThread(mojom::CastConfigRequest request) { 34 void BindCastConfigOnMainThread(mojom::CastConfigRequest request) {
29 WmShell::Get()->cast_config()->BindRequest(std::move(request)); 35 WmShell::Get()->cast_config()->BindRequest(std::move(request));
30 } 36 }
31 37
32 void BindLocaleNotificationControllerOnMainThread( 38 void BindLocaleNotificationControllerOnMainThread(
33 mojom::LocaleNotificationControllerRequest request) { 39 mojom::LocaleNotificationControllerRequest request) {
34 WmShell::Get()->locale_notification_controller()->BindRequest( 40 WmShell::Get()->locale_notification_controller()->BindRequest(
35 std::move(request)); 41 std::move(request));
36 } 42 }
37 43
(...skipping 25 matching lines...) Expand all
63 WmShell::Get()->wallpaper_controller()->BindRequest(std::move(request)); 69 WmShell::Get()->wallpaper_controller()->BindRequest(std::move(request));
64 } 70 }
65 71
66 } // namespace 72 } // namespace
67 73
68 namespace mojo_interface_factory { 74 namespace mojo_interface_factory {
69 75
70 void RegisterInterfaces( 76 void RegisterInterfaces(
71 service_manager::InterfaceRegistry* registry, 77 service_manager::InterfaceRegistry* registry,
72 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) { 78 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) {
79 registry->AddInterface(
80 base::Bind(&BindAcceleratorControllerRequestOnMainThread),
81 main_thread_task_runner);
73 registry->AddInterface(base::Bind(&BindCastConfigOnMainThread), 82 registry->AddInterface(base::Bind(&BindCastConfigOnMainThread),
74 main_thread_task_runner); 83 main_thread_task_runner);
75 registry->AddInterface( 84 registry->AddInterface(
76 base::Bind(&BindLocaleNotificationControllerOnMainThread), 85 base::Bind(&BindLocaleNotificationControllerOnMainThread),
77 main_thread_task_runner); 86 main_thread_task_runner);
78 registry->AddInterface(base::Bind(&BindShelfRequestOnMainThread), 87 registry->AddInterface(base::Bind(&BindShelfRequestOnMainThread),
79 main_thread_task_runner); 88 main_thread_task_runner);
80 registry->AddInterface(base::Bind(&BindShutdownControllerRequestOnMainThread), 89 registry->AddInterface(base::Bind(&BindShutdownControllerRequestOnMainThread),
81 main_thread_task_runner); 90 main_thread_task_runner);
82 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread), 91 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread),
83 main_thread_task_runner); 92 main_thread_task_runner);
84 registry->AddInterface(base::Bind(&BindTouchViewRequestOnMainThread), 93 registry->AddInterface(base::Bind(&BindTouchViewRequestOnMainThread),
85 main_thread_task_runner); 94 main_thread_task_runner);
86 #if defined(OS_CHROMEOS) 95 #if defined(OS_CHROMEOS)
87 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), 96 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread),
88 main_thread_task_runner); 97 main_thread_task_runner);
89 #endif 98 #endif
90 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), 99 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread),
91 main_thread_task_runner); 100 main_thread_task_runner);
92 } 101 }
93 102
94 } // namespace mojo_interface_factory 103 } // namespace mojo_interface_factory
95 104
96 } // namespace ash 105 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/accelerators/accelerator_controller.cc ('k') | ash/mus/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698