| 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/accelerators/accelerator_table.h" | 7 #include "ash/accelerators/accelerator_table.h" |
| 8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
| 9 #include "ash/caps_lock_delegate.h" | 9 #include "ash/caps_lock_delegate.h" |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 screen_rotation->AddObserver(ash::Shell::GetPrimaryRootWindow()); | 144 screen_rotation->AddObserver(ash::Shell::GetPrimaryRootWindow()); |
| 145 ash::Shell::GetPrimaryRootWindow()->layer()->GetAnimator()->StartAnimation( | 145 ash::Shell::GetPrimaryRootWindow()->layer()->GetAnimator()->StartAnimation( |
| 146 screen_rotation.release()); | 146 screen_rotation.release()); |
| 147 return true; | 147 return true; |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool HandleToggleDesktopBackgroundMode() { | 150 bool HandleToggleDesktopBackgroundMode() { |
| 151 ash::DesktopBackgroundController* desktop_background_controller = | 151 ash::DesktopBackgroundController* desktop_background_controller = |
| 152 ash::Shell::GetInstance()->desktop_background_controller(); | 152 ash::Shell::GetInstance()->desktop_background_controller(); |
| 153 if (desktop_background_controller->desktop_background_mode() == | 153 if (desktop_background_controller->desktop_background_mode() == |
| 154 ash::DesktopBackgroundController::BACKGROUND_IMAGE) | 154 ash::DesktopBackgroundController::BACKGROUND_IMAGE) { |
| 155 desktop_background_controller->SetDesktopBackgroundSolidColorMode(); | 155 desktop_background_controller->SetDesktopBackgroundSolidColorMode(); |
| 156 else | 156 } else { |
| 157 desktop_background_controller->SetLoggedInUserWallpaper(); | 157 ash::Shell::GetInstance()->user_wallpaper_delegate()-> |
| 158 SetLoggedInUserWallpaper(); |
| 159 } |
| 158 return true; | 160 return true; |
| 159 } | 161 } |
| 160 | 162 |
| 161 bool HandleToggleRootWindowFullScreen() { | 163 bool HandleToggleRootWindowFullScreen() { |
| 162 ash::Shell::GetPrimaryRootWindow()->ToggleFullScreen(); | 164 ash::Shell::GetPrimaryRootWindow()->ToggleFullScreen(); |
| 163 return true; | 165 return true; |
| 164 } | 166 } |
| 165 | 167 |
| 166 bool HandlePrintLayerHierarchy() { | 168 bool HandlePrintLayerHierarchy() { |
| 167 aura::RootWindow* root_window = ash::Shell::GetPrimaryRootWindow(); | 169 aura::RootWindow* root_window = ash::Shell::GetPrimaryRootWindow(); |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 // Then set this one as active. | 543 // Then set this one as active. |
| 542 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); | 544 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); |
| 543 } | 545 } |
| 544 } | 546 } |
| 545 | 547 |
| 546 bool AcceleratorController::CanHandleAccelerators() const { | 548 bool AcceleratorController::CanHandleAccelerators() const { |
| 547 return true; | 549 return true; |
| 548 } | 550 } |
| 549 | 551 |
| 550 } // namespace ash | 552 } // namespace ash |
| OLD | NEW |