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

Side by Side Diff: ash/accelerators/accelerator_controller.cc

Issue 9580023: Enable user change background image in settings page in Aura build. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Move kPresetWallpaperIndex to desktop_background_resource 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | ash/desktop_background/desktop_background_controller.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/accelerators/accelerator_controller.h" 5 #include "ash/accelerators/accelerator_controller.h"
6 6
7 #include "ash/caps_lock_delegate.h" 7 #include "ash/caps_lock_delegate.h"
8 #include "ash/ime_control_delegate.h" 8 #include "ash/ime_control_delegate.h"
9 #include "ash/launcher/launcher.h" 9 #include "ash/launcher/launcher.h"
10 #include "ash/launcher/launcher_model.h" 10 #include "ash/launcher/launcher_model.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 new ui::LayerAnimationSequence(new ui::ScreenRotation(delta))); 192 new ui::LayerAnimationSequence(new ui::ScreenRotation(delta)));
193 screen_rotation->AddObserver(ash::Shell::GetRootWindow()); 193 screen_rotation->AddObserver(ash::Shell::GetRootWindow());
194 ash::Shell::GetRootWindow()->layer()->GetAnimator()->StartAnimation( 194 ash::Shell::GetRootWindow()->layer()->GetAnimator()->StartAnimation(
195 screen_rotation.release()); 195 screen_rotation.release());
196 return true; 196 return true;
197 } 197 }
198 198
199 bool HandleToggleDesktopBackgroundMode() { 199 bool HandleToggleDesktopBackgroundMode() {
200 ash::Shell* shell = ash::Shell::GetInstance(); 200 ash::Shell* shell = ash::Shell::GetInstance();
201 if (shell->desktop_background_mode() == ash::Shell::BACKGROUND_IMAGE) 201 if (shell->desktop_background_mode() == ash::Shell::BACKGROUND_IMAGE)
202 shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_SOLID_COLOR); 202 shell->SetDesktopBackgroundSolidColor();
203 else 203 else {
204 shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_IMAGE); 204 shell->SetDesktopBackgroundImage(ash::Shell::GetInstance()->
205 desktop_background_controller()->
206 GetUserWallpaper());
207 }
205 return true; 208 return true;
206 } 209 }
207 210
208 bool HandleToggleRootWindowFullScreen() { 211 bool HandleToggleRootWindowFullScreen() {
209 ash::Shell::GetRootWindow()->ToggleFullScreen(); 212 ash::Shell::GetRootWindow()->ToggleFullScreen();
210 return true; 213 return true;
211 } 214 }
212 215
213 bool HandlePrintLayerHierarchy() { 216 bool HandlePrintLayerHierarchy() {
214 aura::RootWindow* root_window = ash::Shell::GetRootWindow(); 217 aura::RootWindow* root_window = ash::Shell::GetRootWindow();
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 NOTREACHED() << "Unhandled action " << it->second; 398 NOTREACHED() << "Unhandled action " << it->second;
396 } 399 }
397 return false; 400 return false;
398 } 401 }
399 402
400 bool AcceleratorController::CanHandleAccelerators() const { 403 bool AcceleratorController::CanHandleAccelerators() const {
401 return true; 404 return true;
402 } 405 }
403 406
404 } // namespace ash 407 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | ash/desktop_background/desktop_background_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698