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

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

Issue 42571: Reverting r12383, caused a build breakage on all platforms. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/toolbar_view.cc ('k') | chrome/views/controls/button/custom_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 5 #ifndef CHROME_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
6 #define CHROME_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 6 #define CHROME_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
7 7
8 #include "chrome/common/animation.h" 8 #include "chrome/common/animation.h"
9 #include "chrome/views/controls/button/button.h" 9 #include "chrome/views/controls/button/button.h"
10 10
(...skipping 25 matching lines...) Expand all
36 void StartThrobbing(int cycles_til_stop); 36 void StartThrobbing(int cycles_til_stop);
37 37
38 // Set how long the hover animation will last for. 38 // Set how long the hover animation will last for.
39 void SetAnimationDuration(int duration); 39 void SetAnimationDuration(int duration);
40 40
41 // Overridden from View: 41 // Overridden from View:
42 virtual void SetEnabled(bool enabled); 42 virtual void SetEnabled(bool enabled);
43 virtual bool IsEnabled() const; 43 virtual bool IsEnabled() const;
44 virtual bool IsFocusable() const; 44 virtual bool IsFocusable() const;
45 45
46 void set_triggerable_event_flags(int triggerable_event_flags) {
47 triggerable_event_flags_ = triggerable_event_flags;
48 }
49
50 int triggerable_event_flags() const {
51 return triggerable_event_flags_;
52 }
53
54 protected: 46 protected:
55 // Construct the Button with a Listener. See comment for Button's ctor. 47 // Construct the Button with a Listener. See comment for Button's ctor.
56 explicit CustomButton(ButtonListener* listener); 48 explicit CustomButton(ButtonListener* listener);
57 49
58 // Returns true if the event is one that can trigger notifying the listener. 50 // Returns true if the event is one that can trigger notifying the listener.
59 // This implementation returns true if the left mouse button is down. 51 // This implementation returns true if the left mouse button is down.
60 virtual bool IsTriggerableEvent(const MouseEvent& e); 52 virtual bool IsTriggerableEvent(const MouseEvent& e);
61 53
62 // Overridden from View: 54 // Overridden from View:
63 virtual bool AcceleratorPressed(const Accelerator& accelerator); 55 virtual bool AcceleratorPressed(const Accelerator& accelerator);
(...skipping 23 matching lines...) Expand all
87 void SetHighlighted(bool highlighted); 79 void SetHighlighted(bool highlighted);
88 bool IsHighlighted() const; 80 bool IsHighlighted() const;
89 81
90 // Returns whether the button is pushed. 82 // Returns whether the button is pushed.
91 bool IsPushed() const; 83 bool IsPushed() const;
92 84
93 // Should we animate when the state changes? Defaults to true, but false while 85 // Should we animate when the state changes? Defaults to true, but false while
94 // throbbing. 86 // throbbing.
95 bool animate_on_state_change_; 87 bool animate_on_state_change_;
96 88
97 // Mouse event flags which can trigger button actions.
98 int triggerable_event_flags_;
99
100 DISALLOW_COPY_AND_ASSIGN(CustomButton); 89 DISALLOW_COPY_AND_ASSIGN(CustomButton);
101 }; 90 };
102 91
103 } // namespace views 92 } // namespace views
104 93
105 #endif // CHROME_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_ 94 #endif // CHROME_VIEWS_CONTROLS_BUTTON_CUSTOM_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/toolbar_view.cc ('k') | chrome/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698