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

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

Issue 2897533003: Change default ink drop center points to center of contents bounds (Closed)
Patch Set: . Created 3 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
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"
11 #include "ui/gfx/geometry/point.h" 11 #include "ui/gfx/geometry/point.h"
12 #include "ui/gfx/geometry/point_f.h"
12 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
13 #include "ui/views/animation/ink_drop.h" 14 #include "ui/views/animation/ink_drop.h"
14 #include "ui/views/animation/ink_drop_host.h" 15 #include "ui/views/animation/ink_drop_host.h"
15 #include "ui/views/view.h" 16 #include "ui/views/view.h"
16 17
17 namespace views { 18 namespace views {
18 class InkDropImpl; 19 class InkDropImpl;
19 class InkDropMask; 20 class InkDropMask;
20 21
21 namespace test { 22 namespace test {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 127
127 // Returns an InkDropImpl with default configuration. The base implementation 128 // Returns an InkDropImpl with default configuration. The base implementation
128 // of CreateInkDrop() delegates to this function. 129 // of CreateInkDrop() delegates to this function.
129 std::unique_ptr<InkDropImpl> CreateDefaultInkDropImpl(); 130 std::unique_ptr<InkDropImpl> CreateDefaultInkDropImpl();
130 131
131 private: 132 private:
132 class InkDropGestureHandler; 133 class InkDropGestureHandler;
133 friend class InkDropGestureHandler; 134 friend class InkDropGestureHandler;
134 friend class test::InkDropHostViewTestApi; 135 friend class test::InkDropHostViewTestApi;
135 136
137 gfx::PointF GetMirroredCenterPoint() const;
bruthig 2017/05/23 14:43:31 nit: This doesn't appear to be used?
Evan Stade 2017/05/23 23:02:37 Done.
138
136 // The last user Event to trigger an ink drop ripple animation. 139 // The last user Event to trigger an ink drop ripple animation.
137 std::unique_ptr<ui::LocatedEvent> last_ripple_triggering_event_; 140 std::unique_ptr<ui::LocatedEvent> last_ripple_triggering_event_;
138 141
139 // Defines what type of |ink_drop_| to create. 142 // Defines what type of |ink_drop_| to create.
140 InkDropMode ink_drop_mode_; 143 InkDropMode ink_drop_mode_;
141 144
142 // Should not be accessed directly. Use GetInkDrop() instead. 145 // Should not be accessed directly. Use GetInkDrop() instead.
143 std::unique_ptr<InkDrop> ink_drop_; 146 std::unique_ptr<InkDrop> ink_drop_;
144 147
145 // Intentionally declared after |ink_drop_| so that it doesn't access a 148 // Intentionally declared after |ink_drop_| so that it doesn't access a
146 // destroyed |ink_drop_| during destruction. 149 // destroyed |ink_drop_| during destruction.
147 std::unique_ptr<InkDropGestureHandler> gesture_handler_; 150 std::unique_ptr<InkDropGestureHandler> gesture_handler_;
148 151
149 float ink_drop_visible_opacity_; 152 float ink_drop_visible_opacity_;
150 153
151 // Determines whether the view was already painting to layer before adding ink 154 // Determines whether the view was already painting to layer before adding ink
152 // drop layer. 155 // drop layer.
153 bool old_paint_to_layer_; 156 bool old_paint_to_layer_;
154 157
155 bool destroying_; 158 bool destroying_;
156 159
157 std::unique_ptr<views::InkDropMask> ink_drop_mask_; 160 std::unique_ptr<views::InkDropMask> ink_drop_mask_;
158 161
159 DISALLOW_COPY_AND_ASSIGN(InkDropHostView); 162 DISALLOW_COPY_AND_ASSIGN(InkDropHostView);
160 }; 163 };
161 } // namespace views 164 } // namespace views
162 165
163 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_ 166 #endif // UI_VIEWS_ANIMATION_INK_DROP_HOST_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_button.cc ('k') | ui/views/animation/ink_drop_host_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698