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 6c9a1629119b5947cfe2cce1f052bf0c055b1e1f..5ea7e3f58f134b501e086149dd23c9a312f12dcd 100644 |
--- a/ui/views/controls/button/custom_button.h |
+++ b/ui/views/controls/button/custom_button.h |
@@ -98,6 +98,14 @@ class VIEWS_EXPORT CustomButton : public Button, |
// Construct the Button with a Listener. See comment for Button's ctor. |
explicit CustomButton(ButtonListener* listener); |
+ // Returns whether or not the button should respond to mouse events. This |
+ // could be false if e.g. the button is showing a menu and wants to remain |
+ // pressed. |
+ // This is checked for mouse movement (OnMouse[Entered|Exited|Moved]) only; |
+ // other mouse events (like OnMousePressed) are still processed normally. |
+ // Defaults to true. |
+ virtual bool ShouldRespondToMouseMovement(); |
+ |
// Invoked from SetState() when SetState() is passed a value that differs from |
// the current state. CustomButton's implementation of StateChanged() does |
// nothing; this method is provided for subclasses that wish to do something |