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

Side by Side Diff: ui/base/animation/animation_container_test_helper.cc

Issue 11453012: Fix black background when locking with fullscreen window: (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rename undo/stop to cancel Created 8 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/base/animation/animation_container_test_helper.h"
6
7 using base::TimeDelta;
8 using base::TimeTicks;
9
10 namespace ui {
11 namespace test {
12
13 AnimationContainerTestHelper::AnimationContainerTestHelper(
14 AnimationContainer* container)
15 : container_(container) {
16 }
17
18 AnimationContainerTestHelper::~AnimationContainerTestHelper() {
19 }
20
21 void AnimationContainerTestHelper::Advance(TimeDelta delta) {
22 time_controller_.Advance(delta);
23 if (IsAnimating())
24 container_->Run();
25 }
26
27 void AnimationContainerTestHelper::AdvanceUntilDone() {
28 while (IsAnimating())
29 Advance(TimeDelta::FromSeconds(1));
30 }
31
32 bool AnimationContainerTestHelper::IsAnimating() {
33 return container_->timer_.IsRunning();
34 }
35
36 } // namespace test
37 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698