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

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

Issue 547303003: Keep reference view pressed while extension actions have a popup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698