summaryrefslogtreecommitdiffstats
path: root/chrome/views
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/views')
-rw-r--r--chrome/views/controls/button/custom_button.cc5
-rw-r--r--chrome/views/controls/button/custom_button.h11
2 files changed, 2 insertions, 14 deletions
diff --git a/chrome/views/controls/button/custom_button.cc b/chrome/views/controls/button/custom_button.cc
index 4193918..a01c0ab 100644
--- a/chrome/views/controls/button/custom_button.cc
+++ b/chrome/views/controls/button/custom_button.cc
@@ -82,14 +82,13 @@ bool CustomButton::IsFocusable() const {
CustomButton::CustomButton(ButtonListener* listener)
: Button(listener),
state_(BS_NORMAL),
- animate_on_state_change_(true),
- triggerable_event_flags_(MouseEvent::EF_LEFT_BUTTON_DOWN) {
+ animate_on_state_change_(true) {
hover_animation_.reset(new ThrobAnimation(this));
hover_animation_->SetSlideDuration(kHoverFadeDurationMs);
}
bool CustomButton::IsTriggerableEvent(const MouseEvent& e) {
- return (triggerable_event_flags_ & e.GetFlags()) != 0;
+ return e.IsLeftMouseButton();
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/views/controls/button/custom_button.h b/chrome/views/controls/button/custom_button.h
index db0bc9e..cb4db5d 100644
--- a/chrome/views/controls/button/custom_button.h
+++ b/chrome/views/controls/button/custom_button.h
@@ -43,14 +43,6 @@ class CustomButton : public Button,
virtual bool IsEnabled() const;
virtual bool IsFocusable() const;
- void set_triggerable_event_flags(int triggerable_event_flags) {
- triggerable_event_flags_ = triggerable_event_flags;
- }
-
- int triggerable_event_flags() const {
- return triggerable_event_flags_;
- }
-
protected:
// Construct the Button with a Listener. See comment for Button's ctor.
explicit CustomButton(ButtonListener* listener);
@@ -94,9 +86,6 @@ class CustomButton : public Button,
// throbbing.
bool animate_on_state_change_;
- // Mouse event flags which can trigger button actions.
- int triggerable_event_flags_;
-
DISALLOW_COPY_AND_ASSIGN(CustomButton);
};