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

Unified Diff: views/controls/button/button_dropdown.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/button_dropdown.h ('k') | views/controls/button/checkbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/button_dropdown.cc
diff --git a/views/controls/button/button_dropdown.cc b/views/controls/button/button_dropdown.cc
index c2da5982ac487c75f04bd9751c3c15bcbe52272f..7afdbd5231a7bb406603ba6e5f19d0a67944999e 100644
--- a/views/controls/button/button_dropdown.cc
+++ b/views/controls/button/button_dropdown.cc
@@ -73,17 +73,12 @@ bool ButtonDropDown::OnMouseDragged(const MouseEvent& event) {
return result;
}
-void ButtonDropDown::OnMouseReleased(const MouseEvent& event, bool canceled) {
- // Showing the drop down results in a MouseReleased with a canceled drag, we
- // need to ignore it.
- if (!canceled && (IsTriggerableEvent(event) ||
- (event.IsRightMouseButton() && !HitTest(event.location())))) {
- ImageButton::OnMouseReleased(event, canceled);
+void ButtonDropDown::OnMouseReleased(const MouseEvent& event) {
+ if (IsTriggerableEvent(event) ||
+ (event.IsRightMouseButton() && !HitTest(event.location()))) {
+ ImageButton::OnMouseReleased(event);
}
- if (canceled)
- return;
-
if (IsTriggerableEvent(event))
show_menu_factory_.RevokeAll();
« no previous file with comments | « views/controls/button/button_dropdown.h ('k') | views/controls/button/checkbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698