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

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

Issue 2720183002: [Views] Update ink drop for omnibox icons (Closed)
Patch Set: Update the behavior Created 3 years, 9 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_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_H_ 6 #define UI_VIEWS_ANIMATION_INK_DROP_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 28 matching lines...) Expand all
39 // the only one available because it was the only InkDropState that clients 39 // the only one available because it was the only InkDropState that clients
40 // needed to skip animations for. 40 // needed to skip animations for.
41 virtual void SnapToActivated() = 0; 41 virtual void SnapToActivated() = 0;
42 42
43 // Enables or disables the hover state. 43 // Enables or disables the hover state.
44 virtual void SetHovered(bool is_hovered) = 0; 44 virtual void SetHovered(bool is_hovered) = 0;
45 45
46 // Enables or disables the focus state. 46 // Enables or disables the focus state.
47 virtual void SetFocused(bool is_focused) = 0; 47 virtual void SetFocused(bool is_focused) = 0;
48 48
49 // Returns true if the highlight should be visible based on the hover/focus
50 // status.
51 virtual bool ShouldHighlight() const = 0;
bruthig 2017/03/08 18:58:24 If we keep this function we should come up with a
spqchan 2017/03/14 00:07:52 I just realized that there's a IsHighlightFadingIn
52
49 protected: 53 protected:
50 InkDrop() {} 54 InkDrop() {}
51 55
52 private: 56 private:
53 DISALLOW_COPY_AND_ASSIGN(InkDrop); 57 DISALLOW_COPY_AND_ASSIGN(InkDrop);
54 }; 58 };
55 59
56 // A View which can be used to parent ink drop layers. Typically this is used 60 // A View which can be used to parent ink drop layers. Typically this is used
57 // as a non-ancestor view to labels so that the labels can paint on an opaque 61 // as a non-ancestor view to labels so that the labels can paint on an opaque
58 // canvas. This is used to avoid ugly text renderings when labels with subpixel 62 // canvas. This is used to avoid ugly text renderings when labels with subpixel
59 // rendering enabled are painted onto a non-opaque canvas. 63 // rendering enabled are painted onto a non-opaque canvas.
60 class VIEWS_EXPORT InkDropContainerView : public views::View { 64 class VIEWS_EXPORT InkDropContainerView : public views::View {
61 public: 65 public:
62 InkDropContainerView(); 66 InkDropContainerView();
63 67
64 void AddInkDropLayer(ui::Layer* ink_drop_layer); 68 void AddInkDropLayer(ui::Layer* ink_drop_layer);
65 void RemoveInkDropLayer(ui::Layer* ink_drop_layer); 69 void RemoveInkDropLayer(ui::Layer* ink_drop_layer);
66 70
67 // View: 71 // View:
68 bool CanProcessEventsWithinSubtree() const override; 72 bool CanProcessEventsWithinSubtree() const override;
69 73
70 private: 74 private:
71 DISALLOW_COPY_AND_ASSIGN(InkDropContainerView); 75 DISALLOW_COPY_AND_ASSIGN(InkDropContainerView);
72 }; 76 };
73 77
74 } // namespace views 78 } // namespace views
75 79
76 #endif // UI_VIEWS_ANIMATION_INK_DROP_H_ 80 #endif // UI_VIEWS_ANIMATION_INK_DROP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698