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

Unified Diff: ash/mus/window_manager_application.cc

Issue 2259153002: mash: Port ash_sysui ShelfDelegateMus impl to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 4 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/mus/window_manager_application.h ('k') | ash/public/interfaces/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager_application.cc
diff --git a/ash/mus/window_manager_application.cc b/ash/mus/window_manager_application.cc
index 809a2e56966ad60b772e6cf298e7ad020a3c7880..b10fcac1496441d66f4c8d0beadf83d1374a39ba 100644
--- a/ash/mus/window_manager_application.cc
+++ b/ash/mus/window_manager_application.cc
@@ -7,8 +7,10 @@
#include <utility>
#include "ash/common/material_design/material_design_controller.h"
+#include "ash/common/wm_shell.h"
#include "ash/mus/accelerators/accelerator_registrar_impl.h"
#include "ash/mus/native_widget_factory_mus.h"
+#include "ash/mus/shelf_delegate_mus.h"
#include "ash/mus/window_manager.h"
#include "base/bind.h"
#include "base/memory/ptr_util.h"
@@ -119,6 +121,7 @@ void WindowManagerApplication::OnStart(const shell::Identity& identity) {
bool WindowManagerApplication::OnConnect(const shell::Identity& remote_identity,
shell::InterfaceRegistry* registry) {
+ registry->AddInterface<ash::mojom::ShelfController>(this);
registry->AddInterface<ui::mojom::AcceleratorRegistrar>(this);
if (remote_identity.name() == "mojo:mash_session") {
connector()->ConnectToInterface(remote_identity, &session_);
@@ -130,7 +133,16 @@ bool WindowManagerApplication::OnConnect(const shell::Identity& remote_identity,
void WindowManagerApplication::Create(
const shell::Identity& remote_identity,
- mojo::InterfaceRequest<ui::mojom::AcceleratorRegistrar> request) {
+ ash::mojom::ShelfControllerRequest request) {
+ ash::mojom::ShelfController* shelf_controller =
+ static_cast<ShelfDelegateMus*>(WmShell::Get()->shelf_delegate());
+ DCHECK(shelf_controller);
+ shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request));
+}
+
+void WindowManagerApplication::Create(
+ const shell::Identity& remote_identity,
+ ui::mojom::AcceleratorRegistrarRequest request) {
if (!window_manager_->window_manager_client())
return; // Can happen during shutdown.
« no previous file with comments | « ash/mus/window_manager_application.h ('k') | ash/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698