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

Unified Diff: ui/views/controls/button/custom_button.h

Issue 1534303002: CustomButton cleanup: make protected members private, create accessors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dont move declaration randomly 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/custom_button.h
diff --git a/ui/views/controls/button/custom_button.h b/ui/views/controls/button/custom_button.h
index 55c392e18aa60a16a01ae0a097cb95228f35662f..2f04cb4b0b6c82d9b1bfd23b241d434bab4dd858 100644
--- a/ui/views/controls/button/custom_button.h
+++ b/ui/views/controls/button/custom_button.h
@@ -9,13 +9,10 @@
#include "base/memory/scoped_ptr.h"
#include "ui/events/event_constants.h"
#include "ui/gfx/animation/animation_delegate.h"
+#include "ui/gfx/animation/throb_animation.h"
#include "ui/views/animation/ink_drop_state.h"
#include "ui/views/controls/button/button.h"
-namespace gfx {
-class ThrobAnimation;
-}
-
namespace views {
class InkDropDelegate;
@@ -147,11 +144,9 @@ class VIEWS_EXPORT CustomButton : public Button,
void NotifyClick(const ui::Event& event) override;
void OnClickCanceled(const ui::Event& event) override;
- // The button state (defined in implementation)
- ButtonState state_;
-
- // Hover animation.
- scoped_ptr<gfx::ThrobAnimation> hover_animation_;
+ const gfx::ThrobAnimation& hover_animation() const {
+ return hover_animation_;
+ }
private:
// Returns true if this is not a top level widget. Virtual for tests.
@@ -159,6 +154,10 @@ class VIEWS_EXPORT CustomButton : public Button,
// Returns true if the focus is not in a top level widget. Virtual for tests.
virtual bool FocusInChildWidget() const;
+ ButtonState state_;
+
+ gfx::ThrobAnimation hover_animation_;
+
// Should we animate when the state changes? Defaults to true.
bool animate_on_state_change_;
« no previous file with comments | « ui/app_list/views/search_box_view.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698