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

Side by Side Diff: ui/views/animation/ink_drop_host_view.h

Issue 2094343005: Fix MD button hover shadow effect on odd-sized buttons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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_INK_DROP_HOST_VIEW_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ 6 #define UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 ink_drop_visible_opacity_ = visible_opacity; 44 ink_drop_visible_opacity_ = visible_opacity;
45 } 45 }
46 float ink_drop_visible_opacity() const { return ink_drop_visible_opacity_; } 46 float ink_drop_visible_opacity() const { return ink_drop_visible_opacity_; }
47 47
48 // Returns the default InkDropRipple centered on |center_point|. 48 // Returns the default InkDropRipple centered on |center_point|.
49 std::unique_ptr<InkDropRipple> CreateDefaultInkDropRipple( 49 std::unique_ptr<InkDropRipple> CreateDefaultInkDropRipple(
50 const gfx::Point& center_point) const; 50 const gfx::Point& center_point) const;
51 51
52 // Returns the default InkDropHighlight centered on |center_point|. 52 // Returns the default InkDropHighlight centered on |center_point|.
53 std::unique_ptr<InkDropHighlight> CreateDefaultInkDropHighlight( 53 std::unique_ptr<InkDropHighlight> CreateDefaultInkDropHighlight(
54 const gfx::Point& center_point) const; 54 const gfx::PointF& center_point) const;
55 55
56 // Returns the point of the |last_ripple_triggering_event_| if it was a 56 // Returns the point of the |last_ripple_triggering_event_| if it was a
57 // LocatedEvent, otherwise the center point of the local bounds is returned. 57 // LocatedEvent, otherwise the center point of the local bounds is returned.
58 gfx::Point GetInkDropCenterBasedOnLastEvent() const; 58 gfx::Point GetInkDropCenterBasedOnLastEvent() const;
59 59
60 // Animates |ink_drop_| to the desired |ink_drop_state|. Caches |event| as the 60 // Animates |ink_drop_| to the desired |ink_drop_state|. Caches |event| as the
61 // last_ripple_triggering_event(). 61 // last_ripple_triggering_event().
62 // 62 //
63 // *** NOTE ***: |event| has been plumbed through on a best effort basis for 63 // *** NOTE ***: |event| has been plumbed through on a best effort basis for
64 // the purposes of centering ink drop ripples on located Events. Thus nullptr 64 // the purposes of centering ink drop ripples on located Events. Thus nullptr
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // drop layer. 108 // drop layer.
109 bool old_paint_to_layer_; 109 bool old_paint_to_layer_;
110 110
111 bool destroying_; 111 bool destroying_;
112 112
113 DISALLOW_COPY_AND_ASSIGN(InkDropHostView); 113 DISALLOW_COPY_AND_ASSIGN(InkDropHostView);
114 }; 114 };
115 } // namespace views 115 } // namespace views
116 116
117 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ 117 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698