| 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/caps_lock_delegate.h" | 7 #include "ash/caps_lock_delegate.h" |
| 8 #include "ash/launcher/launcher.h" | 8 #include "ash/launcher/launcher.h" |
| 9 #include "ash/launcher/launcher_model.h" | 9 #include "ash/launcher/launcher_model.h" |
| 10 #include "ash/screenshot_delegate.h" | 10 #include "ash/screenshot_delegate.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 scoped_ptr<ui::LayerAnimationSequence> screen_rotation( | 124 scoped_ptr<ui::LayerAnimationSequence> screen_rotation( |
| 125 new ui::LayerAnimationSequence(new ui::ScreenRotation(delta))); | 125 new ui::LayerAnimationSequence(new ui::ScreenRotation(delta))); |
| 126 screen_rotation->AddObserver(aura::RootWindow::GetInstance()); | 126 screen_rotation->AddObserver(aura::RootWindow::GetInstance()); |
| 127 aura::RootWindow::GetInstance()->layer()->GetAnimator()->StartAnimation( | 127 aura::RootWindow::GetInstance()->layer()->GetAnimator()->StartAnimation( |
| 128 screen_rotation.release()); | 128 screen_rotation.release()); |
| 129 return true; | 129 return true; |
| 130 } | 130 } |
| 131 | 131 |
| 132 bool HandleToggleCompactWindowMode() { | 132 bool HandleToggleCompactWindowMode() { |
| 133 if (ash::Shell::GetInstance()->IsWindowModeCompact()) | 133 if (ash::Shell::GetInstance()->IsWindowModeCompact()) |
| 134 ash::Shell::GetInstance()->ChangeWindowMode(ash::Shell::NORMAL_MODE); | 134 ash::Shell::GetInstance()->ChangeWindowMode(ash::Shell::MODE_OVERLAPPING); |
| 135 else | 135 else |
| 136 ash::Shell::GetInstance()->ChangeWindowMode(ash::Shell::COMPACT_MODE); | 136 ash::Shell::GetInstance()->ChangeWindowMode(ash::Shell::MODE_COMPACT); |
| 137 return true; | 137 return true; |
| 138 } | 138 } |
| 139 | 139 |
| 140 bool HandleToggleRootWindowFullScreen() { | 140 bool HandleToggleRootWindowFullScreen() { |
| 141 aura::RootWindow::GetInstance()->ToggleFullScreen(); | 141 aura::RootWindow::GetInstance()->ToggleFullScreen(); |
| 142 return true; | 142 return true; |
| 143 } | 143 } |
| 144 | 144 |
| 145 bool HandlePrintLayerHierarchy() { | 145 bool HandlePrintLayerHierarchy() { |
| 146 aura::RootWindow* root_window = aura::RootWindow::GetInstance(); | 146 aura::RootWindow* root_window = aura::RootWindow::GetInstance(); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 NOTREACHED() << "Unhandled action " << it->second;; | 252 NOTREACHED() << "Unhandled action " << it->second;; |
| 253 } | 253 } |
| 254 return false; | 254 return false; |
| 255 } | 255 } |
| 256 | 256 |
| 257 bool AcceleratorController::CanHandleAccelerators() const { | 257 bool AcceleratorController::CanHandleAccelerators() const { |
| 258 return true; | 258 return true; |
| 259 } | 259 } |
| 260 | 260 |
| 261 } // namespace ash | 261 } // namespace ash |
| OLD | NEW |