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

Unified Diff: ui/views/animation/test/square_ink_drop_ripple_test_api.cc

Issue 1937103003: Rename of InkDropAnimation classes to InkDropRipple. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed test_ink_drop_animation_observer.h from views.gyp and doc update. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/animation/test/square_ink_drop_ripple_test_api.cc
diff --git a/ui/views/animation/test/square_ink_drop_ripple_test_api.cc b/ui/views/animation/test/square_ink_drop_ripple_test_api.cc
new file mode 100644
index 0000000000000000000000000000000000000000..e340a7b653ca2ffaa2b15a0fc155425bad9fb77d
--- /dev/null
+++ b/ui/views/animation/test/square_ink_drop_ripple_test_api.cc
@@ -0,0 +1,52 @@
+// Copyright 2015 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/views/animation/test/square_ink_drop_ripple_test_api.h"
+
+#include <vector>
+
+#include "base/time/time.h"
+#include "ui/compositor/layer.h"
+#include "ui/compositor/layer_animator.h"
+#include "ui/compositor/test/layer_animator_test_controller.h"
+#include "ui/views/animation/ink_drop_ripple.h"
+
+namespace views {
+namespace test {
+
+SquareInkDropRippleTestApi::SquareInkDropRippleTestApi(
+ SquareInkDropRipple* ink_drop_ripple)
+ : InkDropRippleTestApi(ink_drop_ripple) {}
+
+SquareInkDropRippleTestApi::~SquareInkDropRippleTestApi() {}
+
+void SquareInkDropRippleTestApi::CalculateCircleTransforms(
+ const gfx::Size& size,
+ InkDropTransforms* transforms_out) const {
+ ink_drop_ripple()->CalculateCircleTransforms(size, transforms_out);
+}
+void SquareInkDropRippleTestApi::CalculateRectTransforms(
+ const gfx::Size& size,
+ float corner_radius,
+ InkDropTransforms* transforms_out) const {
+ ink_drop_ripple()->CalculateRectTransforms(size, corner_radius,
+ transforms_out);
+}
+
+float SquareInkDropRippleTestApi::GetCurrentOpacity() const {
+ return ink_drop_ripple()->GetCurrentOpacity();
+}
+
+std::vector<ui::LayerAnimator*>
+SquareInkDropRippleTestApi::GetLayerAnimators() {
+ std::vector<ui::LayerAnimator*> animators =
+ InkDropRippleTestApi::GetLayerAnimators();
+ animators.push_back(ink_drop_ripple()->GetRootLayer()->GetAnimator());
+ for (int i = 0; i < SquareInkDropRipple::PAINTED_SHAPE_COUNT; ++i)
+ animators.push_back(ink_drop_ripple()->painted_layers_[i]->GetAnimator());
+ return animators;
+}
+
+} // namespace test
+} // namespace views
« no previous file with comments | « ui/views/animation/test/square_ink_drop_ripple_test_api.h ('k') | ui/views/animation/test/test_ink_drop_animation_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698