Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: ash/accelerators/accelerator_controller.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698