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

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

Issue 1478303003: Converted all Views to use an InkDropDelegate instead of a InkDropAnimationController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved some ripple controlling logic up the Button hierarchy. Created 5 years 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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/events/event_constants.h" 9 #include "ui/events/event_constants.h"
10 #include "ui/gfx/animation/animation_delegate.h" 10 #include "ui/gfx/animation/animation_delegate.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 InkDropDelegate* ink_drop_delegate() const { 130 InkDropDelegate* ink_drop_delegate() const {
131 return ink_drop_delegate_.get(); 131 return ink_drop_delegate_.get();
132 } 132 }
133 133
134 // Overridden from View: 134 // Overridden from View:
135 void OnBoundsChanged(const gfx::Rect& previous_bounds) override; 135 void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
136 void ViewHierarchyChanged( 136 void ViewHierarchyChanged(
137 const ViewHierarchyChangedDetails& details) override; 137 const ViewHierarchyChangedDetails& details) override;
138 void OnBlur() override; 138 void OnBlur() override;
139 139
140 // Overridden from Button:
141 void NotifyClick(const ui::Event& event) override;
142 void OnClickCanceled(const ui::Event& event) override;
143
140 // The button state (defined in implementation) 144 // The button state (defined in implementation)
141 ButtonState state_; 145 ButtonState state_;
142 146
143 // Hover animation. 147 // Hover animation.
144 scoped_ptr<gfx::ThrobAnimation> hover_animation_; 148 scoped_ptr<gfx::ThrobAnimation> hover_animation_;
145 149
146 private: 150 private:
147 // Returns true if this is not a top level widget. Virtual for tests. 151 // Returns true if this is not a top level widget. Virtual for tests.
148 virtual bool IsChildWidget() const; 152 virtual bool IsChildWidget() const;
149 // Returns true if the focus is not in a top level widget. Virtual for tests. 153 // Returns true if the focus is not in a top level widget. Virtual for tests.
(...skipping 16 matching lines...) Expand all
166 170
167 // The event on which the button should notify its listener. 171 // The event on which the button should notify its listener.
168 NotifyAction notify_action_; 172 NotifyAction notify_action_;
169 173
170 DISALLOW_COPY_AND_ASSIGN(CustomButton); 174 DISALLOW_COPY_AND_ASSIGN(CustomButton);
171 }; 175 };
172 176
173 } // namespace views 177 } // namespace views
174 178
175 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 179 #endif // UI_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698