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

Side by Side Diff: ui/views/animation/test/square_ink_drop_animation_test_api.h

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 #ifndef UI_VIEWS_ANIMATION_TEST_SQUARE_INK_DROP_ANIMATION_TEST_API_H_
6 #define UI_VIEWS_ANIMATION_TEST_SQUARE_INK_DROP_ANIMATION_TEST_API_H_
7
8 #include <vector>
9
10 #include "base/macros.h"
11 #include "ui/gfx/geometry/size.h"
12 #include "ui/views/animation/square_ink_drop_animation.h"
13 #include "ui/views/animation/test/ink_drop_animation_test_api.h"
14
15 namespace ui {
16 class LayerAnimator;
17 } // namespace ui
18
19 namespace views {
20 namespace test {
21
22 // Test API to provide internal access to a SquareInkDropAnimation.
23 class SquareInkDropAnimationTestApi : public InkDropAnimationTestApi {
24 public:
25 // Make the private typedefs accessible.
26 using InkDropTransforms = SquareInkDropAnimation::InkDropTransforms;
27 using PaintedShape = SquareInkDropAnimation::PaintedShape;
28
29 explicit SquareInkDropAnimationTestApi(
30 SquareInkDropAnimation* ink_drop_animation);
31 ~SquareInkDropAnimationTestApi() override;
32
33 // Wrapper functions to the wrapped InkDropAnimation:
34 void CalculateCircleTransforms(const gfx::Size& size,
35 InkDropTransforms* transforms_out) const;
36 void CalculateRectTransforms(const gfx::Size& size,
37 float corner_radius,
38 InkDropTransforms* transforms_out) const;
39
40 // InkDropAnimationTestApi:
41 float GetCurrentOpacity() const override;
42
43 protected:
44 // InkDropAnimationTestApi:
45 std::vector<ui::LayerAnimator*> GetLayerAnimators() override;
46
47 private:
48 SquareInkDropAnimation* ink_drop_animation() {
49 return static_cast<const SquareInkDropAnimationTestApi*>(this)
50 ->ink_drop_animation();
51 }
52
53 SquareInkDropAnimation* ink_drop_animation() const {
54 return static_cast<SquareInkDropAnimation*>(
55 InkDropAnimationTestApi::ink_drop_animation());
56 }
57
58 DISALLOW_COPY_AND_ASSIGN(SquareInkDropAnimationTestApi);
59 };
60
61 } // namespace test
62 } // namespace views
63
64 #endif // UI_VIEWS_ANIMATION_TEST_SQUARE_INK_DROP_ANIMATION_TEST_API_H_
OLDNEW
« no previous file with comments | « ui/views/animation/test/ink_drop_ripple_test_api.cc ('k') | ui/views/animation/test/square_ink_drop_animation_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698