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

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

Issue 2413503002: Cleanup mojo Wallpaper interfaces for mash. (Closed)
Patch Set: Cleanup. Created 4 years, 2 months 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
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 "ash/common/shelf/shelf_controller.h" 7 #include "ash/common/shelf/shelf_controller.h"
8 #include "ash/common/system/tray/system_tray_controller.h" 8 #include "ash/common/system/tray/system_tray_controller.h"
9 #include "ash/common/wallpaper/wallpaper_controller.h"
9 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "services/shell/public/cpp/interface_registry.h" 12 #include "services/shell/public/cpp/interface_registry.h"
12 13
13 namespace ash { 14 namespace ash {
14 15
15 namespace { 16 namespace {
16 17
17 void BindShelfControllerRequestOnMainThread( 18 void BindShelfRequestOnMainThread(mojom::ShelfControllerRequest request) {
18 mojom::ShelfControllerRequest request) {
19 WmShell::Get()->shelf_controller()->BindRequest(std::move(request)); 19 WmShell::Get()->shelf_controller()->BindRequest(std::move(request));
20 } 20 }
21 21
22 void BindSystemTrayRequestOnMainThread(mojom::SystemTrayRequest request) { 22 void BindSystemTrayRequestOnMainThread(mojom::SystemTrayRequest request) {
23 WmShell::Get()->system_tray_controller()->BindRequest(std::move(request)); 23 WmShell::Get()->system_tray_controller()->BindRequest(std::move(request));
24 } 24 }
25 25
26 void BindWallpaperRequestOnMainThread(
27 mojom::WallpaperControllerRequest request) {
28 WmShell::Get()->wallpaper_controller()->BindRequest(std::move(request));
29 }
30
26 } // namespace 31 } // namespace
27 32
28 namespace mojo_interface_factory { 33 namespace mojo_interface_factory {
29 34
30 void RegisterInterfaces( 35 void RegisterInterfaces(
31 shell::InterfaceRegistry* registry, 36 shell::InterfaceRegistry* registry,
32 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) { 37 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) {
33 registry->AddInterface(base::Bind(&BindShelfControllerRequestOnMainThread), 38 registry->AddInterface(base::Bind(&BindShelfRequestOnMainThread),
34 main_thread_task_runner); 39 main_thread_task_runner);
35 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread), 40 registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread),
36 main_thread_task_runner); 41 main_thread_task_runner);
42 registry->AddInterface(base::Bind(&BindWallpaperRequestOnMainThread),
43 main_thread_task_runner);
37 } 44 }
38 45
39 } // namespace mojo_interface_factory 46 } // namespace mojo_interface_factory
40 47
41 } // namespace ash 48 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/wallpaper/wallpaper_controller.h » ('j') | ash/common/wallpaper/wallpaper_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698