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

Unified Diff: views/controls/button/menu_button.cc

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, fix tests, cleanup, etc. Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/button/menu_button.h ('k') | views/controls/button/radio_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/menu_button.cc
diff --git a/views/controls/button/menu_button.cc b/views/controls/button/menu_button.cc
index 3ada964f2c6e0bd7224bf69c78ebbb1377630626..3451434e6276f500083018bd550a23756c3d43ae 100644
--- a/views/controls/button/menu_button.cc
+++ b/views/controls/button/menu_button.cc
@@ -198,17 +198,17 @@ bool MenuButton::OnMousePressed(const MouseEvent& event) {
return true;
}
-void MenuButton::OnMouseReleased(const MouseEvent& event, bool canceled) {
+void MenuButton::OnMouseReleased(const MouseEvent& event) {
// Explicitly test for left mouse button to show the menu. If we tested for
// !IsTriggerableEvent it could lead to a situation where we end up showing
// the menu and context menu (this would happen if the right button is not
// triggerable and there's a context menu).
if (GetDragOperations(event.location()) != ui::DragDropTypes::DRAG_NONE &&
- state() != BS_DISABLED && !canceled && !InDrag() &&
- event.IsOnlyLeftMouseButton() && HitTest(event.location())) {
+ state() != BS_DISABLED && !InDrag() && event.IsOnlyLeftMouseButton() &&
+ HitTest(event.location())) {
Activate();
} else {
- TextButton::OnMouseReleased(event, canceled);
+ TextButton::OnMouseReleased(event);
}
}
« no previous file with comments | « views/controls/button/menu_button.h ('k') | views/controls/button/radio_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698