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

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

Issue 2042073002: Centered flood fill style ink drop ripples on mouse/touch points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed LocatedEvent::AsLocatedIfLocatedEvent() as FromIfValid(). Created 4 years, 6 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_ 5 #ifndef UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_
6 #define UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_ 6 #define UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 16 matching lines...) Expand all
27 ~FloodFillInkDropRippleTestApi() override; 27 ~FloodFillInkDropRippleTestApi() override;
28 28
29 // Transforms |point| into the FloodFillInkDropRipples clip layer coordinate 29 // Transforms |point| into the FloodFillInkDropRipples clip layer coordinate
30 // space for the given radius. 30 // space for the given radius.
31 void TransformPoint(float radius, gfx::Point* point); 31 void TransformPoint(float radius, gfx::Point* point);
32 32
33 // Returns the center point that the ripple is drawn at in the original Canvas 33 // Returns the center point that the ripple is drawn at in the original Canvas
34 // coordinate space. 34 // coordinate space.
35 gfx::Point GetDrawnCenterPoint() const; 35 gfx::Point GetDrawnCenterPoint() const;
36 36
37 // Wrapper for FloodFillInkDropRipple::MaxDistanceToCorners().
38 float MaxDistanceToCorners(const gfx::Point& point) const;
39
37 // InkDropRippleTestApi: 40 // InkDropRippleTestApi:
38 float GetCurrentOpacity() const override; 41 float GetCurrentOpacity() const override;
39 42
40 protected: 43 protected:
41 // InkDropRippleTestApi: 44 // InkDropRippleTestApi:
42 std::vector<ui::LayerAnimator*> GetLayerAnimators() override; 45 std::vector<ui::LayerAnimator*> GetLayerAnimators() override;
43 46
44 private: 47 private:
45 FloodFillInkDropRipple* ink_drop_ripple() { 48 FloodFillInkDropRipple* ink_drop_ripple() {
46 return static_cast<const FloodFillInkDropRippleTestApi*>(this) 49 return static_cast<const FloodFillInkDropRippleTestApi*>(this)
47 ->ink_drop_ripple(); 50 ->ink_drop_ripple();
48 } 51 }
49 52
50 FloodFillInkDropRipple* ink_drop_ripple() const { 53 FloodFillInkDropRipple* ink_drop_ripple() const {
51 return static_cast<FloodFillInkDropRipple*>( 54 return static_cast<FloodFillInkDropRipple*>(
52 InkDropRippleTestApi::ink_drop_ripple()); 55 InkDropRippleTestApi::ink_drop_ripple());
53 } 56 }
54 57
55 DISALLOW_COPY_AND_ASSIGN(FloodFillInkDropRippleTestApi); 58 DISALLOW_COPY_AND_ASSIGN(FloodFillInkDropRippleTestApi);
56 }; 59 };
57 60
58 } // namespace test 61 } // namespace test
59 } // namespace views 62 } // namespace views
60 63
61 #endif // UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_ 64 #endif // UI_VIEWS_ANIMATION_TEST_FLOOD_FILL_INK_DROP_RIPPLE_TEST_API_H_
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop_host_view_unittest.cc ('k') | ui/views/animation/test/flood_fill_ink_drop_ripple_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698