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

Unified Diff: ui/events/event.h

Issue 398393003: Require a mouse button release event before counting a press event as a new click. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | ui/events/event.cc » ('j') | ui/events/event.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.h
diff --git a/ui/events/event.h b/ui/events/event.h
index 2988d471b11c1060fc2a49a896d672d52babce44..58cccbbada6e1bec906066e0baab345a59982464 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/event_types.h"
+#include "base/gtest_prod_util.h"
#include "base/logging.h"
#include "base/time/time.h"
#include "ui/events/event_constants.h"
@@ -397,6 +398,8 @@ class EVENTS_EXPORT MouseEvent : public LocatedEvent {
void set_changed_button_flags(int flags) { changed_button_flags_ = flags; }
private:
+ FRIEND_TEST_ALL_PREFIXES(EventTest, DoubleClickRequiresRelease);
+
// Returns the repeat count based on the previous mouse click, if it is
// recent enough and within a small enough distance.
static int GetRepeatCount(const MouseEvent& click_event);
@@ -405,6 +408,7 @@ class EVENTS_EXPORT MouseEvent : public LocatedEvent {
int changed_button_flags_;
static MouseEvent* last_click_event_;
+ static bool last_click_released_;
};
class ScrollEvent;
« no previous file with comments | « no previous file | ui/events/event.cc » ('j') | ui/events/event.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698