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

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

Issue 2550933002: Make all LayerAnimationElement::Create*Element return unique_ptr (Closed)
Patch Set: More change and typo fix Created 4 years 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 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
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
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
OLDNEW
« no previous file with comments | « no previous file | ash/rotator/screen_rotation_animation.cc » ('j') | ui/compositor/layer_animation_element.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698