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

Unified Diff: ui/compositor/test/layer_animator_collection_test_controller.cc

Issue 291843012: compositor: Tick the UI animations from cc, instead of from timer callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ui/compositor/test/layer_animator_collection_test_controller.cc
diff --git a/ui/compositor/test/layer_animator_collection_test_controller.cc b/ui/compositor/test/layer_animator_collection_test_controller.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6370ec8d60b5c88ba0d477443c71a7ae8174cc46
--- /dev/null
+++ b/ui/compositor/test/layer_animator_collection_test_controller.cc
@@ -0,0 +1,30 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/compositor/test/layer_animator_collection_test_controller.h"
+
+#include "ui/compositor/layer_animator.h"
+
+namespace ui {
+
+LayerAnimatorCollectionTestController::LayerAnimatorCollectionTestController(
+ LayerAnimatorCollection* collection)
+ : collection_(collection) {
+ CHECK(collection_);
+}
+
+LayerAnimatorCollectionTestController::
+ ~LayerAnimatorCollectionTestController() {
+}
+
+void LayerAnimatorCollectionTestController::StopAllAnimators() {
+ std::set<scoped_refptr<LayerAnimator> > list = collection_->animators_;
+ for (std::set<scoped_refptr<LayerAnimator> >::iterator iter = list.begin();
+ iter != list.end();
+ ++iter) {
+ (*iter)->StopAnimating();
+ }
+}
+
+} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698