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

Unified Diff: ash/common/mojo_interface_factory.cc

Issue 2420753002: ash: Use mojo LocaleNotificationController interface. (Closed)
Patch Set: Uniquify callbacks 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/BUILD.gn ('k') | ash/common/system/locale/locale_notification_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 e4384fef951d561d0f2334d9a56afb3d4bb5188f..b745571f7c43e67df09979884f92655bc31fa811 100644
--- a/ash/common/mojo_interface_factory.cc
+++ b/ash/common/mojo_interface_factory.cc
@@ -4,7 +4,10 @@
#include "ash/common/mojo_interface_factory.h"
+#include <utility>
+
#include "ash/common/shelf/shelf_controller.h"
+#include "ash/common/system/locale/locale_notification_controller.h"
#include "ash/common/system/tray/system_tray_controller.h"
#include "ash/common/wm_shell.h"
#include "base/bind.h"
@@ -14,6 +17,12 @@ namespace ash {
namespace {
+void BindLocaleNotificationControllerOnMainThread(
+ mojom::LocaleNotificationControllerRequest request) {
+ WmShell::Get()->locale_notification_controller()->BindRequest(
+ std::move(request));
+}
+
void BindShelfControllerRequestOnMainThread(
mojom::ShelfControllerRequest request) {
WmShell::Get()->shelf_controller()->BindRequest(std::move(request));
@@ -30,6 +39,9 @@ namespace mojo_interface_factory {
void RegisterInterfaces(
service_manager::InterfaceRegistry* registry,
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) {
+ registry->AddInterface(
+ base::Bind(&BindLocaleNotificationControllerOnMainThread),
+ main_thread_task_runner);
registry->AddInterface(base::Bind(&BindShelfControllerRequestOnMainThread),
main_thread_task_runner);
registry->AddInterface(base::Bind(&BindSystemTrayRequestOnMainThread),
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/system/locale/locale_notification_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698