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

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

Powered by Google App Engine
This is Rietveld 408576698