OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_delegate_aura.h" | 5 #include "ash/accelerators/accelerator_controller_delegate_aura.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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 // Rotates the screen. | 189 // Rotates the screen. |
190 void HandleRotateScreen() { | 190 void HandleRotateScreen() { |
191 if (Shell::GetInstance()->display_manager()->IsInUnifiedMode()) | 191 if (Shell::GetInstance()->display_manager()->IsInUnifiedMode()) |
192 return; | 192 return; |
193 | 193 |
194 base::RecordAction(UserMetricsAction("Accel_Rotate_Window")); | 194 base::RecordAction(UserMetricsAction("Accel_Rotate_Window")); |
195 gfx::Point point = display::Screen::GetScreen()->GetCursorScreenPoint(); | 195 gfx::Point point = display::Screen::GetScreen()->GetCursorScreenPoint(); |
196 display::Display display = | 196 display::Display display = |
197 display::Screen::GetScreen()->GetDisplayNearestPoint(point); | 197 display::Screen::GetScreen()->GetDisplayNearestPoint(point); |
198 const DisplayInfo& display_info = | 198 const display::ManagedDisplayInfo& display_info = |
199 Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id()); | 199 Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id()); |
200 ScreenRotationAnimator(display.id()) | 200 ScreenRotationAnimator(display.id()) |
201 .Rotate(GetNextRotation(display_info.GetActiveRotation()), | 201 .Rotate(GetNextRotation(display_info.GetActiveRotation()), |
202 display::Display::ROTATION_SOURCE_USER); | 202 display::Display::ROTATION_SOURCE_USER); |
203 } | 203 } |
204 | 204 |
205 // Rotate the active window. | 205 // Rotate the active window. |
206 void HandleRotateActiveWindow() { | 206 void HandleRotateActiveWindow() { |
207 base::RecordAction(UserMetricsAction("Accel_Rotate_Window")); | 207 base::RecordAction(UserMetricsAction("Accel_Rotate_Window")); |
208 aura::Window* active_window = wm::GetActiveWindow(); | 208 aura::Window* active_window = wm::GetActiveWindow(); |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 message_center::NotifierId( | 646 message_center::NotifierId( |
647 message_center::NotifierId::SYSTEM_COMPONENT, | 647 message_center::NotifierId::SYSTEM_COMPONENT, |
648 system_notifier::kNotifierDeprecatedAccelerator), | 648 system_notifier::kNotifierDeprecatedAccelerator), |
649 message_center::RichNotificationData(), | 649 message_center::RichNotificationData(), |
650 new DeprecatedAcceleratorNotificationDelegate)); | 650 new DeprecatedAcceleratorNotificationDelegate)); |
651 message_center::MessageCenter::Get()->AddNotification( | 651 message_center::MessageCenter::Get()->AddNotification( |
652 std::move(notification)); | 652 std::move(notification)); |
653 } | 653 } |
654 | 654 |
655 } // namespace ash | 655 } // namespace ash |
OLD | NEW |