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

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

Issue 2434923002: Handle modified displays in mustash. (Closed)
Patch Set: Fixes after initial review. 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 | « no previous file | ash/mus/root_window_controller.h » ('j') | ash/mus/root_window_controller.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 39a7f232081c991b5dac2ae482a10f303c504e48..031f5e375638fa17c053c5d29b81b5de3ae31ef1 100644
--- a/ash/mus/accelerators/accelerator_controller_delegate_mus.cc
+++ b/ash/mus/accelerators/accelerator_controller_delegate_mus.cc
@@ -53,10 +53,10 @@ bool AcceleratorControllerDelegateMus::HandlesAction(AcceleratorAction action) {
#if defined(OS_CHROMEOS)
case DEV_ADD_REMOVE_DISPLAY:
+ case DEV_TOGGLE_UNIFIED_DESKTOP:
case SWAP_PRIMARY_DISPLAY:
case TOUCH_HUD_PROJECTION_TOGGLE:
return true;
- case DEV_TOGGLE_UNIFIED_DESKTOP:
case LOCK_PRESSED:
case LOCK_RELEASED:
case POWER_PRESSED:
@@ -81,6 +81,7 @@ bool AcceleratorControllerDelegateMus::CanPerformAction(
#if defined(OS_CHROMEOS)
switch (action) {
case DEV_ADD_REMOVE_DISPLAY:
+ case DEV_TOGGLE_UNIFIED_DESKTOP:
case SWAP_PRIMARY_DISPLAY:
case TOUCH_HUD_PROJECTION_TOGGLE:
return true;
@@ -102,6 +103,14 @@ void AcceleratorControllerDelegateMus::PerformAction(
test_display_controller->ToggleAddRemoveDisplay();
break;
}
+ case DEV_TOGGLE_UNIFIED_DESKTOP: {
+ // TODO(kylechar): This is hack. I'm just stealing the shortcut key to
sky 2016/10/19 23:37:59 Please file a bug so we don't forget about it.
kylechar 2016/10/20 15:04:19 Done.
+ // toggle display size in mus. This should be fixed by launch.
+ display::mojom::TestDisplayControllerPtr test_display_controller;
+ connector_->ConnectToInterface("service:ui", &test_display_controller);
+ test_display_controller->ToggleDisplayResolution();
+ break;
+ }
case SWAP_PRIMARY_DISPLAY: {
display::mojom::DisplayControllerPtr display_controller;
connector_->ConnectToInterface("service:ui", &display_controller);
« no previous file with comments | « no previous file | ash/mus/root_window_controller.h » ('j') | ash/mus/root_window_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698