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

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

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: . Created 4 years, 11 months 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
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 <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 NOTREACHED() << "Unknown rotation:" << current; 370 NOTREACHED() << "Unknown rotation:" << current;
371 return gfx::Display::ROTATE_0; 371 return gfx::Display::ROTATE_0;
372 } 372 }
373 373
374 // Rotates the screen. 374 // Rotates the screen.
375 void HandleRotateScreen() { 375 void HandleRotateScreen() {
376 if (Shell::GetInstance()->display_manager()->IsInUnifiedMode()) 376 if (Shell::GetInstance()->display_manager()->IsInUnifiedMode())
377 return; 377 return;
378 378
379 base::RecordAction(UserMetricsAction("Accel_Rotate_Window")); 379 base::RecordAction(UserMetricsAction("Accel_Rotate_Window"));
380 gfx::Point point = Shell::GetScreen()->GetCursorScreenPoint(); 380 gfx::Point point = gfx::Screen::GetScreen()->GetCursorScreenPoint();
381 gfx::Display display = Shell::GetScreen()->GetDisplayNearestPoint(point); 381 gfx::Display display =
382 gfx::Screen::GetScreen()->GetDisplayNearestPoint(point);
382 const DisplayInfo& display_info = 383 const DisplayInfo& display_info =
383 Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id()); 384 Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id());
384 ash::ScreenRotationAnimator(display.id()) 385 ash::ScreenRotationAnimator(display.id())
385 .Rotate(GetNextRotation(display_info.GetActiveRotation()), 386 .Rotate(GetNextRotation(display_info.GetActiveRotation()),
386 gfx::Display::ROTATION_SOURCE_USER); 387 gfx::Display::ROTATION_SOURCE_USER);
387 } 388 }
388 389
389 // Rotate the active window. 390 // Rotate the active window.
390 void HandleRotateActiveWindow() { 391 void HandleRotateActiveWindow() {
391 base::RecordAction(UserMetricsAction("Accel_Rotate_Window")); 392 base::RecordAction(UserMetricsAction("Accel_Rotate_Window"));
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 } 1454 }
1454 1455
1455 void AcceleratorController::SetKeyboardBrightnessControlDelegate( 1456 void AcceleratorController::SetKeyboardBrightnessControlDelegate(
1456 scoped_ptr<KeyboardBrightnessControlDelegate> 1457 scoped_ptr<KeyboardBrightnessControlDelegate>
1457 keyboard_brightness_control_delegate) { 1458 keyboard_brightness_control_delegate) {
1458 keyboard_brightness_control_delegate_ = 1459 keyboard_brightness_control_delegate_ =
1459 std::move(keyboard_brightness_control_delegate); 1460 std::move(keyboard_brightness_control_delegate);
1460 } 1461 }
1461 1462
1462 } // namespace ash 1463 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | ash/display/event_transformation_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698