OLD | NEW |
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/desktop_background/desktop_background_controller.h" |
7 #include "ash/caps_lock_delegate.h" | 8 #include "ash/caps_lock_delegate.h" |
8 #include "ash/ime_control_delegate.h" | 9 #include "ash/ime_control_delegate.h" |
9 #include "ash/launcher/launcher.h" | 10 #include "ash/launcher/launcher.h" |
10 #include "ash/launcher/launcher_model.h" | 11 #include "ash/launcher/launcher_model.h" |
11 #include "ash/screenshot_delegate.h" | 12 #include "ash/screenshot_delegate.h" |
12 #include "ash/shell.h" | 13 #include "ash/shell.h" |
13 #include "ash/shell_delegate.h" | 14 #include "ash/shell_delegate.h" |
14 #include "ash/shell_window_ids.h" | 15 #include "ash/shell_window_ids.h" |
15 #include "ash/system/brightness/brightness_control_delegate.h" | 16 #include "ash/system/brightness/brightness_control_delegate.h" |
16 #include "ash/volume_control_delegate.h" | 17 #include "ash/volume_control_delegate.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 new ui::LayerAnimationSequence(new ui::ScreenRotation(delta))); | 193 new ui::LayerAnimationSequence(new ui::ScreenRotation(delta))); |
193 screen_rotation->AddObserver(ash::Shell::GetRootWindow()); | 194 screen_rotation->AddObserver(ash::Shell::GetRootWindow()); |
194 ash::Shell::GetRootWindow()->layer()->GetAnimator()->StartAnimation( | 195 ash::Shell::GetRootWindow()->layer()->GetAnimator()->StartAnimation( |
195 screen_rotation.release()); | 196 screen_rotation.release()); |
196 return true; | 197 return true; |
197 } | 198 } |
198 | 199 |
199 bool HandleToggleDesktopBackgroundMode() { | 200 bool HandleToggleDesktopBackgroundMode() { |
200 ash::Shell* shell = ash::Shell::GetInstance(); | 201 ash::Shell* shell = ash::Shell::GetInstance(); |
201 if (shell->desktop_background_mode() == ash::Shell::BACKGROUND_IMAGE) | 202 if (shell->desktop_background_mode() == ash::Shell::BACKGROUND_IMAGE) |
202 shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_SOLID_COLOR); | 203 shell->SetDesktopBackgroundSolidColorMode(); |
203 else | 204 else { |
204 shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_IMAGE); | 205 shell->SetDesktopBackgroundImageMode(shell-> |
| 206 desktop_background_controller()->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 Loading... |
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 |
OLD | NEW |