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

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

Issue 2567523002: mash: Have chrome set itself as the app list presenter. (Closed)
Patch Set: Address comments, 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 | « no previous file | ash/common/wm_shell.h » ('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/accelerators/accelerator_controller.h"
10 #include "ash/common/cast_config_controller.h" 10 #include "ash/common/cast_config_controller.h"
11 #include "ash/common/new_window_controller.h" 11 #include "ash/common/new_window_controller.h"
12 #include "ash/common/session/session_controller.h" 12 #include "ash/common/session/session_controller.h"
13 #include "ash/common/shelf/shelf_controller.h" 13 #include "ash/common/shelf/shelf_controller.h"
14 #include "ash/common/shell_delegate.h"
14 #include "ash/common/shutdown_controller.h" 15 #include "ash/common/shutdown_controller.h"
15 #include "ash/common/system/locale/locale_notification_controller.h" 16 #include "ash/common/system/locale/locale_notification_controller.h"
16 #include "ash/common/system/tray/system_tray_controller.h" 17 #include "ash/common/system/tray/system_tray_controller.h"
17 #include "ash/common/wallpaper/wallpaper_controller.h" 18 #include "ash/common/wallpaper/wallpaper_controller.h"
18 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 19 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
19 #include "ash/common/wm_shell.h" 20 #include "ash/common/wm_shell.h"
20 #include "base/bind.h" 21 #include "base/bind.h"
21 #include "services/service_manager/public/cpp/interface_registry.h" 22 #include "services/service_manager/public/cpp/interface_registry.h"
23 #include "ui/app_list/presenter/app_list.h"
22 24
23 #if defined(OS_CHROMEOS) 25 #if defined(OS_CHROMEOS)
24 #include "ash/common/system/chromeos/network/vpn_list.h" 26 #include "ash/common/system/chromeos/network/vpn_list.h"
25 #endif 27 #endif
26 28
27 namespace ash { 29 namespace ash {
28 30
29 namespace { 31 namespace {
30 32
31 void BindAcceleratorControllerRequestOnMainThread( 33 void BindAcceleratorControllerRequestOnMainThread(
32 mojom::AcceleratorControllerRequest request) { 34 mojom::AcceleratorControllerRequest request) {
33 WmShell::Get()->accelerator_controller()->BindRequest(std::move(request)); 35 WmShell::Get()->accelerator_controller()->BindRequest(std::move(request));
34 } 36 }
35 37
38 void BindAppListRequestOnMainThread(app_list::mojom::AppListRequest request) {
39 WmShell::Get()->app_list()->BindRequest(std::move(request));
40 }
41
36 void BindCastConfigOnMainThread(mojom::CastConfigRequest request) { 42 void BindCastConfigOnMainThread(mojom::CastConfigRequest request) {
37 WmShell::Get()->cast_config()->BindRequest(std::move(request)); 43 WmShell::Get()->cast_config()->BindRequest(std::move(request));
38 } 44 }
39 45
40 void BindLocaleNotificationControllerOnMainThread( 46 void BindLocaleNotificationControllerOnMainThread(
41 mojom::LocaleNotificationControllerRequest request) { 47 mojom::LocaleNotificationControllerRequest request) {
42 WmShell::Get()->locale_notification_controller()->BindRequest( 48 WmShell::Get()->locale_notification_controller()->BindRequest(
43 std::move(request)); 49 std::move(request));
44 } 50 }
45 51
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } // namespace 90 } // namespace
85 91
86 namespace mojo_interface_factory { 92 namespace mojo_interface_factory {
87 93
88 void RegisterInterfaces( 94 void RegisterInterfaces(
89 service_manager::InterfaceRegistry* registry, 95 service_manager::InterfaceRegistry* registry,
90 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) { 96 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) {
91 registry->AddInterface( 97 registry->AddInterface(
92 base::Bind(&BindAcceleratorControllerRequestOnMainThread), 98 base::Bind(&BindAcceleratorControllerRequestOnMainThread),
93 main_thread_task_runner); 99 main_thread_task_runner);
100 registry->AddInterface(base::Bind(&BindAppListRequestOnMainThread),
101 main_thread_task_runner);
94 registry->AddInterface(base::Bind(&BindCastConfigOnMainThread), 102 registry->AddInterface(base::Bind(&BindCastConfigOnMainThread),
95 main_thread_task_runner); 103 main_thread_task_runner);
96 registry->AddInterface( 104 registry->AddInterface(
97 base::Bind(&BindLocaleNotificationControllerOnMainThread), 105 base::Bind(&BindLocaleNotificationControllerOnMainThread),
98 main_thread_task_runner); 106 main_thread_task_runner);
99 registry->AddInterface( 107 registry->AddInterface(
100 base::Bind(&BindNewWindowControllerRequestOnMainThread), 108 base::Bind(&BindNewWindowControllerRequestOnMainThread),
101 main_thread_task_runner); 109 main_thread_task_runner);
102 registry->AddInterface(base::Bind(&BindSessionControllerRequestOnMainThread), 110 registry->AddInterface(base::Bind(&BindSessionControllerRequestOnMainThread),
103 main_thread_task_runner); 111 main_thread_task_runner);
104 registry->AddInterface(base::Bind(&BindShelfRequestOnMainThread), 112 registry->AddInterface(base::Bind(&BindShelfRequestOnMainThread),
105 main_thread_task_runner); 113 main_thread_task_runner);
106 registry->AddInterface(base::Bind(&BindShutdownControllerRequestOnMainThread), 114 registry->AddInterface(base::Bind(&BindShutdownControllerRequestOnMainThread),
107 main_thread_task_runner); 115 main_thread_task_runner);
108 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread), 116 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread),
109 main_thread_task_runner); 117 main_thread_task_runner);
110 registry->AddInterface(base::Bind(&BindTouchViewRequestOnMainThread), 118 registry->AddInterface(base::Bind(&BindTouchViewRequestOnMainThread),
111 main_thread_task_runner); 119 main_thread_task_runner);
112 #if defined(OS_CHROMEOS) 120 #if defined(OS_CHROMEOS)
113 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread), 121 registry->AddInterface(base::Bind(&BindVpnListRequestOnMainThread),
114 main_thread_task_runner); 122 main_thread_task_runner);
115 #endif 123 #endif
116 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread), 124 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread),
117 main_thread_task_runner); 125 main_thread_task_runner);
118 } 126 }
119 127
120 } // namespace mojo_interface_factory 128 } // namespace mojo_interface_factory
121 129
122 } // namespace ash 130 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/wm_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698