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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 9703031: Retry landing "Enable users change desktop background image from settings page in Chromeos Aura bui… (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge to trunk Created 8 years, 9 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/ash.gyp » ('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 0eb7ce809b2fbf83cd01dd3bd441bd0f2bdfb654..b43b5f4858809c4a87dc4bfa5d79a048c6646238 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -5,6 +5,7 @@
#include "ash/accelerators/accelerator_controller.h"
#include "ash/accelerators/accelerator_table.h"
+#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/ash_switches.h"
#include "ash/caps_lock_delegate.h"
#include "ash/ime_control_delegate.h"
@@ -90,11 +91,13 @@ bool HandleRotateScreen() {
}
bool HandleToggleDesktopBackgroundMode() {
- ash::Shell* shell = ash::Shell::GetInstance();
- if (shell->desktop_background_mode() == ash::Shell::BACKGROUND_IMAGE)
- shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_SOLID_COLOR);
+ ash::DesktopBackgroundController* desktop_background_controller =
+ ash::Shell::GetInstance()->desktop_background_controller();
+ if (desktop_background_controller->desktop_background_mode() ==
+ ash::DesktopBackgroundController::BACKGROUND_IMAGE)
+ desktop_background_controller->SetDesktopBackgroundSolidColorMode();
else
- shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_IMAGE);
+ desktop_background_controller->SetPreviousDesktopBackgroundImage();
return true;
}
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698