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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 9414028: Aura: New window shadows, desktop background debug toggle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 8 years, 10 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_controller_unittest.cc » ('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 cb262967cf22abaa84bbb94512e45cbbab022f11..0dc741d1d8c4788a52008fc9c30e6a5d7ce4d993 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -50,6 +50,7 @@ enum AcceleratorAction {
PRINT_WINDOW_HIERARCHY,
ROTATE_SCREEN,
TOGGLE_COMPACT_WINDOW_MODE,
+ TOGGLE_DESKTOP_BACKGROUND_MODE,
TOGGLE_ROOT_WINDOW_FULL_SCREEN,
#endif
};
@@ -124,6 +125,8 @@ const struct AcceleratorData {
ROTATE_SCREEN },
{ ui::ET_TRANSLATED_KEY_PRESS, ui::VKEY_A, false, true, true,
TOGGLE_COMPACT_WINDOW_MODE },
+ { ui::ET_TRANSLATED_KEY_PRESS, ui::VKEY_B, false, true, true,
+ TOGGLE_DESKTOP_BACKGROUND_MODE },
{ ui::ET_TRANSLATED_KEY_PRESS, ui::VKEY_F11, false, true, false,
TOGGLE_ROOT_WINDOW_FULL_SCREEN },
{ ui::ET_TRANSLATED_KEY_PRESS, ui::VKEY_L, false, false, true,
@@ -204,6 +207,15 @@ bool HandleToggleCompactWindowMode() {
return true;
}
+bool HandleToggleDesktopBackgroundMode() {
+ ash::Shell* shell = ash::Shell::GetInstance();
+ if (shell->desktop_background_mode() == ash::Shell::BACKGROUND_IMAGE)
+ shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_SOLID_COLOR);
+ else
+ shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_IMAGE);
+ return true;
+}
+
bool HandleToggleRootWindowFullScreen() {
aura::RootWindow::GetInstance()->ToggleFullScreen();
return true;
@@ -381,6 +393,8 @@ bool AcceleratorController::AcceleratorPressed(
return HandleRotateScreen();
case TOGGLE_COMPACT_WINDOW_MODE:
return HandleToggleCompactWindowMode();
+ case TOGGLE_DESKTOP_BACKGROUND_MODE:
+ return HandleToggleDesktopBackgroundMode();
case TOGGLE_ROOT_WINDOW_FULL_SCREEN:
return HandleToggleRootWindowFullScreen();
case PRINT_LAYER_HIERARCHY:
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698