| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <iostream> | 9 #include <iostream> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 gfx::Point point = Shell::GetScreen()->GetCursorScreenPoint(); | 276 gfx::Point point = Shell::GetScreen()->GetCursorScreenPoint(); |
| 277 gfx::Display display = Shell::GetScreen()->GetDisplayNearestPoint(point); | 277 gfx::Display display = Shell::GetScreen()->GetDisplayNearestPoint(point); |
| 278 const DisplayInfo& display_info = | 278 const DisplayInfo& display_info = |
| 279 Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id()); | 279 Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id()); |
| 280 Shell::GetInstance()->display_manager()->SetDisplayRotation( | 280 Shell::GetInstance()->display_manager()->SetDisplayRotation( |
| 281 display.id(), GetNextRotation(display_info.rotation())); | 281 display.id(), GetNextRotation(display_info.rotation())); |
| 282 return true; | 282 return true; |
| 283 } | 283 } |
| 284 | 284 |
| 285 bool HandleToggleRootWindowFullScreen() { | 285 bool HandleToggleRootWindowFullScreen() { |
| 286 Shell::GetPrimaryRootWindow()->ToggleFullScreen(); | 286 Shell::GetPrimaryRootWindow()->GetDispatcher()->ToggleFullScreen(); |
| 287 return true; | 287 return true; |
| 288 } | 288 } |
| 289 | 289 |
| 290 // Magnify the screen | 290 // Magnify the screen |
| 291 bool HandleMagnifyScreen(int delta_index) { | 291 bool HandleMagnifyScreen(int delta_index) { |
| 292 if (ash::Shell::GetInstance()->magnification_controller()->IsEnabled()) { | 292 if (ash::Shell::GetInstance()->magnification_controller()->IsEnabled()) { |
| 293 // TODO(yoshiki): Move the following logic to MagnificationController. | 293 // TODO(yoshiki): Move the following logic to MagnificationController. |
| 294 float scale = | 294 float scale = |
| 295 ash::Shell::GetInstance()->magnification_controller()->GetScale(); | 295 ash::Shell::GetInstance()->magnification_controller()->GetScale(); |
| 296 // Calculate rounded logarithm (base kMagnificationScaleFactor) of scale. | 296 // Calculate rounded logarithm (base kMagnificationScaleFactor) of scale. |
| (...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 keyboard_brightness_control_delegate) { | 980 keyboard_brightness_control_delegate) { |
| 981 keyboard_brightness_control_delegate_ = | 981 keyboard_brightness_control_delegate_ = |
| 982 keyboard_brightness_control_delegate.Pass(); | 982 keyboard_brightness_control_delegate.Pass(); |
| 983 } | 983 } |
| 984 | 984 |
| 985 bool AcceleratorController::CanHandleAccelerators() const { | 985 bool AcceleratorController::CanHandleAccelerators() const { |
| 986 return true; | 986 return true; |
| 987 } | 987 } |
| 988 | 988 |
| 989 } // namespace ash | 989 } // namespace ash |
| OLD | NEW |