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

Side by Side Diff: ash/wm/session_state_animator_impl.cc

Issue 2823343006: cros: Fix unlock crash with multi-display (Closed)
Patch Set: add comment for test Created 3 years, 8 months 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
« no previous file with comments | « ash/wm/session_state_animator.h ('k') | ash/wm/session_state_animator_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/wm/session_state_animator_impl.h" 5 #include "ash/wm/session_state_animator_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
11 #include "ash/wm/wm_window_animations.h" 11 #include "ash/wm/wm_window_animations.h"
12 #include "base/barrier_closure.h"
12 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
13 #include "ui/aura/client/aura_constants.h" 14 #include "ui/aura/client/aura_constants.h"
14 #include "ui/aura/window_event_dispatcher.h" 15 #include "ui/aura/window_event_dispatcher.h"
15 #include "ui/compositor/layer_animation_observer.h" 16 #include "ui/compositor/layer_animation_observer.h"
16 #include "ui/compositor/layer_animation_sequence.h" 17 #include "ui/compositor/layer_animation_sequence.h"
17 #include "ui/compositor/scoped_layer_animation_settings.h" 18 #include "ui/compositor/scoped_layer_animation_settings.h"
18 #include "ui/views/widget/widget.h" 19 #include "ui/views/widget/widget.h"
19 20
20 namespace ash { 21 namespace ash {
21 namespace { 22 namespace {
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 } 542 }
542 } 543 }
543 544
544 void SessionStateAnimatorImpl::StartAnimationWithCallback( 545 void SessionStateAnimatorImpl::StartAnimationWithCallback(
545 int container_mask, 546 int container_mask,
546 AnimationType type, 547 AnimationType type,
547 AnimationSpeed speed, 548 AnimationSpeed speed,
548 base::Closure callback) { 549 base::Closure callback) {
549 aura::Window::Windows containers; 550 aura::Window::Windows containers;
550 GetContainers(container_mask, &containers); 551 GetContainers(container_mask, &containers);
552 base::Closure animation_done_closure =
553 base::BarrierClosure(containers.size(), callback);
551 for (aura::Window::Windows::const_iterator it = containers.begin(); 554 for (aura::Window::Windows::const_iterator it = containers.begin();
552 it != containers.end(); ++it) { 555 it != containers.end(); ++it) {
553 ui::LayerAnimationObserver* observer = 556 ui::LayerAnimationObserver* observer =
554 new CallbackAnimationObserver(callback); 557 new CallbackAnimationObserver(animation_done_closure);
555 RunAnimationForWindow(*it, type, speed, observer); 558 RunAnimationForWindow(*it, type, speed, observer);
556 } 559 }
557 } 560 }
558 561
559 SessionStateAnimator::AnimationSequence* 562 SessionStateAnimator::AnimationSequence*
560 SessionStateAnimatorImpl::BeginAnimationSequence(base::Closure callback) { 563 SessionStateAnimatorImpl::BeginAnimationSequence(base::Closure callback) {
561 return new AnimationSequence(this, callback); 564 return new AnimationSequence(this, callback);
562 } 565 }
563 566
564 bool SessionStateAnimatorImpl::IsWallpaperHidden() const { 567 bool SessionStateAnimatorImpl::IsWallpaperHidden() const {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 gfx::Tween::EASE_IN, observer); 655 gfx::Tween::EASE_IN, observer);
653 break; 656 break;
654 case ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS: 657 case ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS:
655 StartGrayscaleBrightnessAnimationForWindow( 658 StartGrayscaleBrightnessAnimationForWindow(
656 window, 0.0, duration, gfx::Tween::EASE_IN_OUT, observer); 659 window, 0.0, duration, gfx::Tween::EASE_IN_OUT, observer);
657 break; 660 break;
658 } 661 }
659 } 662 }
660 663
661 } // namespace ash 664 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/session_state_animator.h ('k') | ash/wm/session_state_animator_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698