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