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

Unified Diff: ui/events/event.h

Issue 308023002: Add EF_IS_REPEAT flag to KeyEvent to handle repeated accelerators correctly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use ui::EF_IS_REPEAT in test instead Created 6 years, 6 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 | « ui/base/accelerators/accelerator.cc ('k') | 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
diff --git a/ui/events/event.h b/ui/events/event.h
index e39ba1e1e5a38b80a9e6dd951a1f0e2d3bae0831..dfd867ec4626935e93aa2277ac49099243d13f8c 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -81,6 +81,7 @@ class EVENTS_EXPORT Event {
bool IsCapsLockDown() const { return (flags_ & EF_CAPS_LOCK_DOWN) != 0; }
bool IsAltDown() const { return (flags_ & EF_ALT_DOWN) != 0; }
bool IsAltGrDown() const { return (flags_ & EF_ALTGR_DOWN) != 0; }
+ bool IsRepeat() const { return (flags_ & EF_IS_REPEAT) != 0; }
bool IsKeyEvent() const {
return type_ == ET_KEY_PRESSED ||
@@ -581,6 +582,10 @@ class EVENTS_EXPORT KeyEvent : public Event {
bool is_char_;
uint16 character_;
+
+ static bool IsRepeated(const KeyEvent& event);
+
+ static KeyEvent* last_key_event_;
};
class EVENTS_EXPORT ScrollEvent : public MouseEvent {
« no previous file with comments | « ui/base/accelerators/accelerator.cc ('k') | ui/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698