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

Side by Side Diff: ui/views/animation/test/square_ink_drop_ripple_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_RIPPLE_TEST_API_H_
6 #define UI_VIEWS_ANIMATION_TEST_SQUARE_INK_DROP_RIPPLE_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_ripple.h"
13 #include "ui/views/animation/test/ink_drop_ripple_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 SquareInkDropRipple.
23 class SquareInkDropRippleTestApi : public InkDropRippleTestApi {
24 public:
25 // Make the private typedefs accessible.
26 using InkDropTransforms = SquareInkDropRipple::InkDropTransforms;
27 using PaintedShape = SquareInkDropRipple::PaintedShape;
28
29 explicit SquareInkDropRippleTestApi(SquareInkDropRipple* ink_drop_ripple);
30 ~SquareInkDropRippleTestApi() override;
31
32 // Wrapper functions to the wrapped InkDropRipple:
33 void CalculateCircleTransforms(const gfx::Size& size,
34 InkDropTransforms* transforms_out) const;
35 void CalculateRectTransforms(const gfx::Size& size,
36 float corner_radius,
37 InkDropTransforms* transforms_out) const;
38
39 // InkDropRippleTestApi:
40 float GetCurrentOpacity() const override;
41
42 protected:
43 // InkDropRippleTestApi:
44 std::vector<ui::LayerAnimator*> GetLayerAnimators() override;
45
46 private:
47 SquareInkDropRipple* ink_drop_ripple() {
48 return static_cast<const SquareInkDropRippleTestApi*>(this)
49 ->ink_drop_ripple();
50 }
51
52 SquareInkDropRipple* ink_drop_ripple() const {
53 return static_cast<SquareInkDropRipple*>(
54 InkDropRippleTestApi::ink_drop_ripple());
55 }
56
57 DISALLOW_COPY_AND_ASSIGN(SquareInkDropRippleTestApi);
58 };
59
60 } // namespace test
61 } // namespace views
62
63 #endif // UI_VIEWS_ANIMATION_TEST_SQUARE_INK_DROP_RIPPLE_TEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698