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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 14050009: Add debug shortcuts that toggles options to shows paint rects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added missing debug.cc|h (happened when I created new CL from patch) Created 7 years, 8 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') | no next file with comments »
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 cdc67dca26b5d07c2ee492dcef5589d63f62372b..ac36027fbf7c7e516dacb66720ccf886b6287661 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -12,6 +12,7 @@
#include "ash/accelerators/accelerator_table.h"
#include "ash/ash_switches.h"
#include "ash/caps_lock_delegate.h"
+#include "ash/debug.h"
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/desktop_background/user_wallpaper_delegate.h"
#include "ash/display/display_controller.h"
@@ -368,6 +369,10 @@ void AcceleratorController::Init() {
RegisterAccelerators(kAcceleratorData, kAcceleratorDataLength);
+#if !defined(NDEBUG)
+ RegisterAccelerators(kDesktopAcceleratorData, kDesktopAcceleratorDataLength);
+#endif
+
if (DebugShortcutsEnabled())
RegisterAccelerators(kDebugAcceleratorData, kDebugAcceleratorDataLength);
@@ -808,9 +813,12 @@ bool AcceleratorController::PerformAction(int action,
return HandleToggleDesktopBackgroundMode();
case TOGGLE_ROOT_WINDOW_FULL_SCREEN:
return HandleToggleRootWindowFullScreen();
- case DISPLAY_TOGGLE_SCALE:
+ case DEBUG_TOGGLE_DEVICE_SCALE_FACTOR:
internal::DisplayManager::ToggleDisplayScaleFactor();
return true;
+ case DEBUG_TOGGLE_SHOW_PAINT_RECTS:
+ ash::debug::ToggleShowPaintRects();
+ return true;
case MAGNIFY_SCREEN_ZOOM_IN:
return HandleMagnifyScreen(1);
case MAGNIFY_SCREEN_ZOOM_OUT:
« no previous file with comments | « no previous file | ash/accelerators/accelerator_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698