| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 active_window->layer()->GetAnimator()->StartAnimation( | 190 active_window->layer()->GetAnimator()->StartAnimation( |
| 191 new ui::LayerAnimationSequence( | 191 new ui::LayerAnimationSequence( |
| 192 new WindowRotation(360, active_window->layer()))); | 192 new WindowRotation(360, active_window->layer()))); |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 | 195 |
| 196 void HandleShowSystemTrayBubble() { | 196 void HandleShowSystemTrayBubble() { |
| 197 base::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble")); | 197 base::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble")); |
| 198 RootWindowController* controller = | 198 RootWindowController* controller = |
| 199 RootWindowController::ForTargetRootWindow(); | 199 RootWindowController::ForTargetRootWindow(); |
| 200 if (!controller->GetSystemTray()->HasSystemBubble()) | 200 SystemTray* tray = controller->GetSystemTray(); |
| 201 controller->GetSystemTray()->ShowDefaultView(BUBBLE_CREATE_NEW); | 201 if (!tray->HasSystemBubble()) { |
| 202 tray->ShowDefaultView(BUBBLE_CREATE_NEW); |
| 203 tray->ActivateBubble(); |
| 204 } |
| 202 } | 205 } |
| 203 | 206 |
| 204 void HandleTakeWindowScreenshot(ScreenshotDelegate* screenshot_delegate) { | 207 void HandleTakeWindowScreenshot(ScreenshotDelegate* screenshot_delegate) { |
| 205 base::RecordAction(UserMetricsAction("Accel_Take_Window_Screenshot")); | 208 base::RecordAction(UserMetricsAction("Accel_Take_Window_Screenshot")); |
| 206 DCHECK(screenshot_delegate); | 209 DCHECK(screenshot_delegate); |
| 207 Shell::GetInstance()->screenshot_controller()->StartWindowScreenshotSession( | 210 Shell::GetInstance()->screenshot_controller()->StartWindowScreenshotSession( |
| 208 screenshot_delegate); | 211 screenshot_delegate); |
| 209 } | 212 } |
| 210 | 213 |
| 211 void HandleTakePartialScreenshot(ScreenshotDelegate* screenshot_delegate) { | 214 void HandleTakePartialScreenshot(ScreenshotDelegate* screenshot_delegate) { |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 message_center::NotifierId( | 502 message_center::NotifierId( |
| 500 message_center::NotifierId::SYSTEM_COMPONENT, | 503 message_center::NotifierId::SYSTEM_COMPONENT, |
| 501 system_notifier::kNotifierDeprecatedAccelerator), | 504 system_notifier::kNotifierDeprecatedAccelerator), |
| 502 message_center::RichNotificationData(), | 505 message_center::RichNotificationData(), |
| 503 new DeprecatedAcceleratorNotificationDelegate)); | 506 new DeprecatedAcceleratorNotificationDelegate)); |
| 504 message_center::MessageCenter::Get()->AddNotification( | 507 message_center::MessageCenter::Get()->AddNotification( |
| 505 std::move(notification)); | 508 std::move(notification)); |
| 506 } | 509 } |
| 507 | 510 |
| 508 } // namespace ash | 511 } // namespace ash |
| OLD | NEW |