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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 new ui::LayerAnimationSequence(new ui::ScreenRotation(delta))); | 196 new ui::LayerAnimationSequence(new ui::ScreenRotation(delta))); |
196 screen_rotation->AddObserver(ash::Shell::GetRootWindow()); | 197 screen_rotation->AddObserver(ash::Shell::GetRootWindow()); |
197 ash::Shell::GetRootWindow()->layer()->GetAnimator()->StartAnimation( | 198 ash::Shell::GetRootWindow()->layer()->GetAnimator()->StartAnimation( |
198 screen_rotation.release()); | 199 screen_rotation.release()); |
199 return true; | 200 return true; |
200 } | 201 } |
201 | 202 |
202 bool HandleToggleDesktopBackgroundMode() { | 203 bool HandleToggleDesktopBackgroundMode() { |
203 ash::Shell* shell = ash::Shell::GetInstance(); | 204 ash::Shell* shell = ash::Shell::GetInstance(); |
204 if (shell->desktop_background_mode() == ash::Shell::BACKGROUND_IMAGE) | 205 if (shell->desktop_background_mode() == ash::Shell::BACKGROUND_IMAGE) |
205 shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_SOLID_COLOR); | 206 shell->SetDesktopBackgroundSolidColorMode(); |
206 else | 207 else { |
207 shell->SetDesktopBackgroundMode(ash::Shell::BACKGROUND_IMAGE); | 208 shell->SetDesktopBackgroundImageMode(shell-> |
| 209 desktop_background_controller()->GetPreviouseWallpaper()); |
| 210 } |
208 return true; | 211 return true; |
209 } | 212 } |
210 | 213 |
211 bool HandleToggleRootWindowFullScreen() { | 214 bool HandleToggleRootWindowFullScreen() { |
212 ash::Shell::GetRootWindow()->ToggleFullScreen(); | 215 ash::Shell::GetRootWindow()->ToggleFullScreen(); |
213 return true; | 216 return true; |
214 } | 217 } |
215 | 218 |
216 bool HandlePrintLayerHierarchy() { | 219 bool HandlePrintLayerHierarchy() { |
217 aura::RootWindow* root_window = ash::Shell::GetRootWindow(); | 220 aura::RootWindow* root_window = ash::Shell::GetRootWindow(); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 NOTREACHED() << "Unhandled action " << it->second; | 404 NOTREACHED() << "Unhandled action " << it->second; |
402 } | 405 } |
403 return false; | 406 return false; |
404 } | 407 } |
405 | 408 |
406 bool AcceleratorController::CanHandleAccelerators() const { | 409 bool AcceleratorController::CanHandleAccelerators() const { |
407 return true; | 410 return true; |
408 } | 411 } |
409 | 412 |
410 } // namespace ash | 413 } // namespace ash |
OLD | NEW |