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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 1394573003: chromeos: Add SurfaceServiceProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/accelerators/accelerator_table.h » ('j') | ash/surfaces/test_surface_overlay_view.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 77c3ed2a560cf0d7f53f13162c93b1a60ab9e857..b4c905ca5ad0b8ef88397ff5ddd84da006ffa6bf 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -10,6 +10,7 @@
#include "ash/accelerators/accelerator_commands.h"
#include "ash/accelerators/debug_commands.h"
+#include "ash/surfaces/test_surface_overlay_view.h"
#include "ash/ash_switches.h"
#include "ash/debug.h"
#include "ash/display/window_tree_host_manager.h"
@@ -349,6 +350,11 @@ void HandleRotateActiveWindow() {
}
}
+void HandleShowTestSurfaceOverlay() {
+ base::RecordAction(UserMetricsAction("Accel_Show_Test_Surface_Overlay"));
+ TestSurfaceOverlayView::Show();
+}
+
void HandleShowKeyboardOverlay() {
base::RecordAction(UserMetricsAction("Accel_Show_Keyboard_Overlay"));
ash::Shell::GetInstance()->new_window_delegate()->ShowKeyboardOverlay();
@@ -1024,6 +1030,7 @@ bool AcceleratorController::CanPerformAction(
case RESTORE_TAB:
case ROTATE_SCREEN:
case ROTATE_WINDOW:
+ case SHOW_TEST_SURFACE_OVERLAY:
case SHOW_KEYBOARD_OVERLAY:
case SHOW_SYSTEM_TRAY_BUBBLE:
case SHOW_TASK_MANAGER:
@@ -1184,6 +1191,9 @@ void AcceleratorController::PerformAction(AcceleratorAction action,
case SCALE_UI_UP:
accelerators::ZoomInternalDisplay(true /* up */);
break;
+ case SHOW_TEST_SURFACE_OVERLAY:
+ HandleShowTestSurfaceOverlay();
+ break;
case SHOW_KEYBOARD_OVERLAY:
HandleShowKeyboardOverlay();
break;
« no previous file with comments | « no previous file | ash/accelerators/accelerator_table.h » ('j') | ash/surfaces/test_surface_overlay_view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698