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

Unified Diff: chrome/browser/ui/browser_command_controller.cc

Issue 2296763009: mash: Fix launching touch hud app in mash mode. (Closed)
Patch Set: ctor; binding; deps 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
« ash/mus/BUILD.gn ('K') | « chrome/browser/ui/DEPS ('k') | mash/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_command_controller.cc
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index baafa1b080c239c1a8e3d0100ae057f13ecfdf79..9fa7d94fa3ebcbd06d47f4a528d23bbe54cc8218 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -28,6 +28,7 @@
#include "chrome/browser/shell_integration.h"
#include "chrome/browser/signin/signin_promo.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
+#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
@@ -52,8 +53,11 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
+#include "content/public/common/mojo_shell_connection.h"
#include "content/public/common/url_constants.h"
#include "extensions/browser/extension_system.h"
+#include "mash/public/interfaces/launchable.mojom.h"
+#include "services/shell/public/cpp/connector.h"
#include "ui/events/keycodes/keyboard_codes.h"
#if defined(OS_MACOSX)
@@ -625,7 +629,16 @@ void BrowserCommandController::ExecuteCommandWithDisposition(
break;
#if defined(OS_CHROMEOS)
case IDC_TOUCH_HUD_PROJECTION_TOGGLE:
- ash::accelerators::ToggleTouchHudProjection();
+ if (chrome::IsRunningInMash()) {
+ shell::Connector* connector =
+ content::MojoShellConnection::GetForProcess()->GetConnector();
+ mash::mojom::LaunchablePtr launchable;
+ connector->ConnectToInterface("mojo:touch_hud", &launchable);
+ launchable->Launch(mash::mojom::kWindow,
+ mash::mojom::LaunchMode::DEFAULT);
sadrul 2016/09/02 18:34:38 Does chrome's manifest not need to list touch-hud?
riajiang 2016/09/02 18:38:58 I added it here: https://codereview.chromium.org/2
+ } else {
+ ash::accelerators::ToggleTouchHudProjection();
+ }
break;
#endif
case IDC_ROUTE_MEDIA:
« ash/mus/BUILD.gn ('K') | « chrome/browser/ui/DEPS ('k') | mash/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698