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

Unified Diff: ash/common/mojo_interface_factory.cc

Issue 2391253004: Use mojo Shelf interfaces for both mash and classic ash. (Closed)
Patch Set: Address comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/DEPS ('k') | ash/common/shelf/shelf_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/mojo_interface_factory.cc
diff --git a/ash/common/mojo_interface_factory.cc b/ash/common/mojo_interface_factory.cc
index 498ff264f9285f9544fe556fbd00727dc5b8c96c..c16d7b4a8a028c82157619f14020fc2598bbb984 100644
--- a/ash/common/mojo_interface_factory.cc
+++ b/ash/common/mojo_interface_factory.cc
@@ -4,6 +4,7 @@
#include "ash/common/mojo_interface_factory.h"
+#include "ash/common/shelf/shelf_controller.h"
#include "ash/common/system/tray/system_tray_controller.h"
#include "ash/common/wm_shell.h"
#include "base/bind.h"
@@ -13,6 +14,11 @@ namespace ash {
namespace {
+void BindShelfControllerRequestOnMainThread(
+ mojom::ShelfControllerRequest request) {
+ WmShell::Get()->shelf_controller()->BindRequest(std::move(request));
+}
+
void BindSystemTrayRequestOnMainThread(mojom::SystemTrayRequest request) {
WmShell::Get()->system_tray_controller()->BindRequest(std::move(request));
}
@@ -24,6 +30,8 @@ namespace mojo_interface_factory {
void RegisterInterfaces(
shell::InterfaceRegistry* registry,
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) {
+ registry->AddInterface(base::Bind(&BindShelfControllerRequestOnMainThread),
+ main_thread_task_runner);
registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread),
main_thread_task_runner);
}
« no previous file with comments | « ash/common/DEPS ('k') | ash/common/shelf/shelf_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698