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

Side by Side Diff: ui/views/controls/button/custom_button.h

Issue 2034963002: Rename InkDropHover to InkDropHighlight (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gyp file 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 5 #ifndef UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
6 #define UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 6 #define UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 bool OnKeyPressed(const ui::KeyEvent& event) override; 103 bool OnKeyPressed(const ui::KeyEvent& event) override;
104 bool OnKeyReleased(const ui::KeyEvent& event) override; 104 bool OnKeyReleased(const ui::KeyEvent& event) override;
105 void OnGestureEvent(ui::GestureEvent* event) override; 105 void OnGestureEvent(ui::GestureEvent* event) override;
106 bool AcceleratorPressed(const ui::Accelerator& accelerator) override; 106 bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
107 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override; 107 bool SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) override;
108 void ShowContextMenu(const gfx::Point& p, 108 void ShowContextMenu(const gfx::Point& p,
109 ui::MenuSourceType source_type) override; 109 ui::MenuSourceType source_type) override;
110 void OnDragDone() override; 110 void OnDragDone() override;
111 void GetAccessibleState(ui::AXViewState* state) override; 111 void GetAccessibleState(ui::AXViewState* state) override;
112 void VisibilityChanged(View* starting_from, bool is_visible) override; 112 void VisibilityChanged(View* starting_from, bool is_visible) override;
113 std::unique_ptr<InkDropHover> CreateInkDropHover() const override; 113 std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const override;
114 SkColor GetInkDropBaseColor() const override; 114 SkColor GetInkDropBaseColor() const override;
115 115
116 // Overridden from gfx::AnimationDelegate: 116 // Overridden from gfx::AnimationDelegate:
117 void AnimationProgressed(const gfx::Animation* animation) override; 117 void AnimationProgressed(const gfx::Animation* animation) override;
118 118
119 // Overridden from View: 119 // Overridden from View:
120 void ViewHierarchyChanged( 120 void ViewHierarchyChanged(
121 const ViewHierarchyChangedDetails& details) override; 121 const ViewHierarchyChangedDetails& details) override;
122 void OnBlur() override; 122 void OnBlur() override;
123 bool ShouldShowInkDropForFocus() const override; 123 bool ShouldShowInkDropForFocus() const override;
(...skipping 10 matching lines...) Expand all
134 134
135 // Returns true if the event is one that can trigger notifying the listener. 135 // Returns true if the event is one that can trigger notifying the listener.
136 // This implementation returns true if the left mouse button is down. 136 // This implementation returns true if the left mouse button is down.
137 virtual bool IsTriggerableEvent(const ui::Event& event); 137 virtual bool IsTriggerableEvent(const ui::Event& event);
138 138
139 // Returns true if the button should become pressed when the user 139 // Returns true if the button should become pressed when the user
140 // holds the mouse down over the button. For this implementation, 140 // holds the mouse down over the button. For this implementation,
141 // we simply return IsTriggerableEvent(event). 141 // we simply return IsTriggerableEvent(event).
142 virtual bool ShouldEnterPushedState(const ui::Event& event); 142 virtual bool ShouldEnterPushedState(const ui::Event& event);
143 143
144 // Returns true if hover effect should be visible. 144 // Returns true if highlight effect should be visible.
145 virtual bool ShouldShowInkDropHover() const; 145 virtual bool ShouldShowInkDropHighlight() const;
146 146
147 void set_has_ink_drop_action_on_click(bool has_ink_drop_action_on_click) { 147 void set_has_ink_drop_action_on_click(bool has_ink_drop_action_on_click) {
148 has_ink_drop_action_on_click_ = has_ink_drop_action_on_click; 148 has_ink_drop_action_on_click_ = has_ink_drop_action_on_click;
149 } 149 }
150 150
151 // Returns true if the button should enter hovered state; that is, if the 151 // Returns true if the button should enter hovered state; that is, if the
152 // mouse is over the button, and no other window has capture (which would 152 // mouse is over the button, and no other window has capture (which would
153 // prevent the button from receiving MouseExited events and updating its 153 // prevent the button from receiving MouseExited events and updating its
154 // state). This does not take into account enabled state. 154 // state). This does not take into account enabled state.
155 bool ShouldEnterHoveredState(); 155 bool ShouldEnterHoveredState();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 // The color of the ripple and hover. 198 // The color of the ripple and hover.
199 SkColor ink_drop_base_color_; 199 SkColor ink_drop_base_color_;
200 200
201 DISALLOW_COPY_AND_ASSIGN(CustomButton); 201 DISALLOW_COPY_AND_ASSIGN(CustomButton);
202 }; 202 };
203 203
204 } // namespace views 204 } // namespace views
205 205
206 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 206 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
OLDNEW
« no previous file with comments | « ui/views/animation/test/test_ink_drop_hover_observer.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698