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

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

Issue 1495753002: Make the material design ripple effect more visible on a quick action (single click or single tap) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests and addressed comments from previous patch sets. Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 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 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_PAINTED_LAYER_DELEGATES_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_PAINTED_LAYER_DELEGATES_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_PAINTED_LAYER_DELEGATES_H_ 6 #define UI_VIEWS_ANIMATION_INK_DROP_PAINTED_LAYER_DELEGATES_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "third_party/skia/include/core/SkColor.h" 10 #include "third_party/skia/include/core/SkColor.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // color, size and corner radius. 85 // color, size and corner radius.
86 class RoundedRectangleLayerDelegate : public BasePaintedLayerDelegate { 86 class RoundedRectangleLayerDelegate : public BasePaintedLayerDelegate {
87 public: 87 public:
88 RoundedRectangleLayerDelegate(SkColor color, 88 RoundedRectangleLayerDelegate(SkColor color,
89 gfx::Size size, 89 gfx::Size size,
90 int corner_radius); 90 int corner_radius);
91 ~RoundedRectangleLayerDelegate() override; 91 ~RoundedRectangleLayerDelegate() override;
92 92
93 const gfx::Size& size() const { return size_; } 93 const gfx::Size& size() const { return size_; }
94 94
95 // ui::LayerDelegate: 95 // BasePaintedLayerDelegate:
96 gfx::PointF GetCenterPoint() const override; 96 gfx::PointF GetCenterPoint() const override;
97 void OnPaintLayer(const ui::PaintContext& context) override; 97 void OnPaintLayer(const ui::PaintContext& context) override;
98 98
99 private: 99 private:
100 // The size of the rectangle. 100 // The size of the rectangle.
101 gfx::Size size_; 101 gfx::Size size_;
102 102
103 // The radius of the corners. 103 // The radius of the corners.
104 int corner_radius_; 104 int corner_radius_;
105 105
106 DISALLOW_COPY_AND_ASSIGN(RoundedRectangleLayerDelegate); 106 DISALLOW_COPY_AND_ASSIGN(RoundedRectangleLayerDelegate);
107 }; 107 };
108 108
109 } // namespace views 109 } // namespace views
110 110
111 #endif // UI_VIEWS_ANIMATION_INK_DROP_PAINTED_LAYER_DELEGATES_H_ 111 #endif // UI_VIEWS_ANIMATION_INK_DROP_PAINTED_LAYER_DELEGATES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698