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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 aura::Window* active_window = wm::GetActiveWindow(); | 180 aura::Window* active_window = wm::GetActiveWindow(); |
181 if (active_window) { | 181 if (active_window) { |
182 // The rotation animation bases its target transform on the current | 182 // The rotation animation bases its target transform on the current |
183 // rotation and position. Since there could be an animation in progress | 183 // rotation and position. Since there could be an animation in progress |
184 // right now, queue this animation so when it starts it picks up a neutral | 184 // right now, queue this animation so when it starts it picks up a neutral |
185 // rotation and position. Use replace so we only enqueue one at a time. | 185 // rotation and position. Use replace so we only enqueue one at a time. |
186 active_window->layer()->GetAnimator()->set_preemption_strategy( | 186 active_window->layer()->GetAnimator()->set_preemption_strategy( |
187 ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS); | 187 ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS); |
188 active_window->layer()->GetAnimator()->StartAnimation( | 188 active_window->layer()->GetAnimator()->StartAnimation( |
189 new ui::LayerAnimationSequence( | 189 new ui::LayerAnimationSequence( |
190 new WindowRotation(360, active_window->layer()))); | 190 base::MakeUnique<WindowRotation>(360, active_window->layer()))); |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 void HandleShowSystemTrayBubble() { | 194 void HandleShowSystemTrayBubble() { |
195 base::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble")); | 195 base::RecordAction(UserMetricsAction("Accel_Show_System_Tray_Bubble")); |
196 RootWindowController* controller = | 196 RootWindowController* controller = |
197 RootWindowController::ForTargetRootWindow(); | 197 RootWindowController::ForTargetRootWindow(); |
198 SystemTray* tray = controller->GetSystemTray(); | 198 SystemTray* tray = controller->GetSystemTray(); |
199 if (!tray->HasSystemBubble()) { | 199 if (!tray->HasSystemBubble()) { |
200 tray->ShowDefaultView(BUBBLE_CREATE_NEW); | 200 tray->ShowDefaultView(BUBBLE_CREATE_NEW); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 message_center::NotifierId( | 500 message_center::NotifierId( |
501 message_center::NotifierId::SYSTEM_COMPONENT, | 501 message_center::NotifierId::SYSTEM_COMPONENT, |
502 system_notifier::kNotifierDeprecatedAccelerator), | 502 system_notifier::kNotifierDeprecatedAccelerator), |
503 message_center::RichNotificationData(), | 503 message_center::RichNotificationData(), |
504 new DeprecatedAcceleratorNotificationDelegate)); | 504 new DeprecatedAcceleratorNotificationDelegate)); |
505 message_center::MessageCenter::Get()->AddNotification( | 505 message_center::MessageCenter::Get()->AddNotification( |
506 std::move(notification)); | 506 std::move(notification)); |
507 } | 507 } |
508 | 508 |
509 } // namespace ash | 509 } // namespace ash |
OLD | NEW |