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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/accelerators/accelerator_controller.cc ('k') | ash/mus/manifest.json » ('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 e359a741b1a700e5b55404310c33f86b170db1d3..3d46f113e19e3c6376c4842d2fe7b32daec85997 100644
--- a/ash/common/mojo_interface_factory.cc
+++ b/ash/common/mojo_interface_factory.cc
@@ -6,6 +6,7 @@
#include <utility>
+#include "ash/common/accelerators/accelerator_controller.h"
#include "ash/common/cast_config_controller.h"
#include "ash/common/shelf/shelf_controller.h"
#include "ash/common/shutdown_controller.h"
@@ -25,6 +26,11 @@ namespace ash {
namespace {
+void BindAcceleratorControllerRequestOnMainThread(
+ mojom::AcceleratorControllerRequest request) {
+ WmShell::Get()->accelerator_controller()->BindRequest(std::move(request));
+}
+
void BindCastConfigOnMainThread(mojom::CastConfigRequest request) {
WmShell::Get()->cast_config()->BindRequest(std::move(request));
}
@@ -70,6 +76,9 @@ namespace mojo_interface_factory {
void RegisterInterfaces(
service_manager::InterfaceRegistry* registry,
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) {
+ registry->AddInterface(
+ base::Bind(&BindAcceleratorControllerRequestOnMainThread),
+ main_thread_task_runner);
registry->AddInterface(base::Bind(&BindCastConfigOnMainThread),
main_thread_task_runner);
registry->AddInterface(
« 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