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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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/views/animation/test/square_ink_drop_ripple_test_api.h"
6
7 #include <vector>
8
9 #include "base/time/time.h"
10 #include "ui/compositor/layer.h"
11 #include "ui/compositor/layer_animator.h"
12 #include "ui/compositor/test/layer_animator_test_controller.h"
13 #include "ui/views/animation/ink_drop_ripple.h"
14
15 namespace views {
16 namespace test {
17
18 SquareInkDropRippleTestApi::SquareInkDropRippleTestApi(
19 SquareInkDropRipple* ink_drop_ripple)
20 : InkDropRippleTestApi(ink_drop_ripple) {}
21
22 SquareInkDropRippleTestApi::~SquareInkDropRippleTestApi() {}
23
24 void SquareInkDropRippleTestApi::CalculateCircleTransforms(
25 const gfx::Size& size,
26 InkDropTransforms* transforms_out) const {
27 ink_drop_ripple()->CalculateCircleTransforms(size, transforms_out);
28 }
29 void SquareInkDropRippleTestApi::CalculateRectTransforms(
30 const gfx::Size& size,
31 float corner_radius,
32 InkDropTransforms* transforms_out) const {
33 ink_drop_ripple()->CalculateRectTransforms(size, corner_radius,
34 transforms_out);
35 }
36
37 float SquareInkDropRippleTestApi::GetCurrentOpacity() const {
38 return ink_drop_ripple()->GetCurrentOpacity();
39 }
40
41 std::vector<ui::LayerAnimator*>
42 SquareInkDropRippleTestApi::GetLayerAnimators() {
43 std::vector<ui::LayerAnimator*> animators =
44 InkDropRippleTestApi::GetLayerAnimators();
45 animators.push_back(ink_drop_ripple()->GetRootLayer()->GetAnimator());
46 for (int i = 0; i < SquareInkDropRipple::PAINTED_SHAPE_COUNT; ++i)
47 animators.push_back(ink_drop_ripple()->painted_layers_[i]->GetAnimator());
48 return animators;
49 }
50
51 } // namespace test
52 } // namespace views
OLDNEW
« 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