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