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

Unified Diff: ash/mus/accelerators/accelerator_controller_delegate_mus.cc

Issue 2296763009: mash: Fix launching touch hud app in mash mode. (Closed)
Patch Set: Created 4 years, 3 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
Index: ash/mus/accelerators/accelerator_controller_delegate_mus.cc
diff --git a/ash/mus/accelerators/accelerator_controller_delegate_mus.cc b/ash/mus/accelerators/accelerator_controller_delegate_mus.cc
index 6498af4b7e02073896d46f127143dff798e7c18b..a52acd38e2cfbd00be2bf93badeec6a76764055a 100644
--- a/ash/mus/accelerators/accelerator_controller_delegate_mus.cc
+++ b/ash/mus/accelerators/accelerator_controller_delegate_mus.cc
@@ -5,11 +5,14 @@
#include "ash/mus/accelerators/accelerator_controller_delegate_mus.h"
#include "base/logging.h"
+#include "mash/public/interfaces/launchable.mojom.h"
namespace ash {
namespace mus {
-AcceleratorControllerDelegateMus::AcceleratorControllerDelegateMus() {}
+AcceleratorControllerDelegateMus::AcceleratorControllerDelegateMus(
+ shell::Connector* connector)
+ : connector_(connector) {}
AcceleratorControllerDelegateMus::~AcceleratorControllerDelegateMus() {}
@@ -53,9 +56,15 @@ bool AcceleratorControllerDelegateMus::HandlesAction(AcceleratorAction action) {
case TOGGLE_MIRROR_MODE:
case TOUCH_HUD_CLEAR:
case TOUCH_HUD_MODE_CHANGE:
- case TOUCH_HUD_PROJECTION_TOGGLE:
NOTIMPLEMENTED();
return false;
+ case TOUCH_HUD_PROJECTION_TOGGLE: {
+ mash::mojom::LaunchablePtr launchable;
+ connector_->ConnectToInterface("mojo:touch_hud", &launchable);
sadrul 2016/09/02 00:52:28 You should add touch_hud as a data_dep for ash/mus
riajiang 2016/09/02 18:18:38 Done.
+ launchable->Launch(mash::mojom::kWindow,
+ mash::mojom::LaunchMode::DEFAULT);
+ return true;
+ }
#endif
default:

Powered by Google App Engine
This is Rietveld 408576698