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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 195 |
196 // Rotates the screen. | 196 // Rotates the screen. |
197 void HandleRotateScreen() { | 197 void HandleRotateScreen() { |
198 if (Shell::GetInstance()->display_manager()->IsInUnifiedMode()) | 198 if (Shell::GetInstance()->display_manager()->IsInUnifiedMode()) |
199 return; | 199 return; |
200 | 200 |
201 base::RecordAction(UserMetricsAction("Accel_Rotate_Window")); | 201 base::RecordAction(UserMetricsAction("Accel_Rotate_Window")); |
202 gfx::Point point = display::Screen::GetScreen()->GetCursorScreenPoint(); | 202 gfx::Point point = display::Screen::GetScreen()->GetCursorScreenPoint(); |
203 display::Display display = | 203 display::Display display = |
204 display::Screen::GetScreen()->GetDisplayNearestPoint(point); | 204 display::Screen::GetScreen()->GetDisplayNearestPoint(point); |
205 const DisplayInfo& display_info = | 205 const ui::ManagedDisplayInfo& display_info = |
206 Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id()); | 206 Shell::GetInstance()->display_manager()->GetDisplayInfo(display.id()); |
207 ScreenRotationAnimator(display.id()) | 207 ScreenRotationAnimator(display.id()) |
208 .Rotate(GetNextRotation(display_info.GetActiveRotation()), | 208 .Rotate(GetNextRotation(display_info.GetActiveRotation()), |
209 display::Display::ROTATION_SOURCE_USER); | 209 display::Display::ROTATION_SOURCE_USER); |
210 } | 210 } |
211 | 211 |
212 // Rotate the active window. | 212 // Rotate the active window. |
213 void HandleRotateActiveWindow() { | 213 void HandleRotateActiveWindow() { |
214 base::RecordAction(UserMetricsAction("Accel_Rotate_Window")); | 214 base::RecordAction(UserMetricsAction("Accel_Rotate_Window")); |
215 aura::Window* active_window = wm::GetActiveWindow(); | 215 aura::Window* active_window = wm::GetActiveWindow(); |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 message_center::NotifierId( | 653 message_center::NotifierId( |
654 message_center::NotifierId::SYSTEM_COMPONENT, | 654 message_center::NotifierId::SYSTEM_COMPONENT, |
655 system_notifier::kNotifierDeprecatedAccelerator), | 655 system_notifier::kNotifierDeprecatedAccelerator), |
656 message_center::RichNotificationData(), | 656 message_center::RichNotificationData(), |
657 new DeprecatedAcceleratorNotificationDelegate)); | 657 new DeprecatedAcceleratorNotificationDelegate)); |
658 message_center::MessageCenter::Get()->AddNotification( | 658 message_center::MessageCenter::Get()->AddNotification( |
659 std::move(notification)); | 659 std::move(notification)); |
660 } | 660 } |
661 | 661 |
662 } // namespace ash | 662 } // namespace ash |
OLD | NEW |