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

Unified Diff: ui/events/event.h

Issue 427003002: Merge 284479 "Require a mouse button release event before counti..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.h
===================================================================
--- ui/events/event.h (revision 286215)
+++ ui/events/event.h (working copy)
@@ -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"
@@ -390,14 +391,25 @@
int changed_button_flags() const { return changed_button_flags_; }
private:
+ FRIEND_TEST_ALL_PREFIXES(EventTest, DoubleClickRequiresRelease);
+ FRIEND_TEST_ALL_PREFIXES(EventTest, SingleClickRightLeft);
+
// 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);
+ // Resets the last_click_event_ for unit tests.
+ static void ResetLastClickForTest();
+
// See description above getter for details.
int changed_button_flags_;
static MouseEvent* last_click_event_;
+
+ // We can create a MouseEvent for a native event more than once. We set this
+ // to true when the next event either has a different timestamp or we see a
+ // release signalling that the press (click) event was completed.
+ static bool last_click_complete_;
};
class ScrollEvent;
« no previous file with comments | « no previous file | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698