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

Unified Diff: ui/base/accelerators/accelerator.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 | « chrome/browser/chromeos/events/event_rewriter_unittest.cc ('k') | ui/base/accelerators/accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/accelerators/accelerator.h
diff --git a/ui/base/accelerators/accelerator.h b/ui/base/accelerators/accelerator.h
index 15ca6cc8ef519d133e2b86665328828f7f952a6e..430a209f41c3145ee89684acc6a8ca0d778db1de 100644
--- a/ui/base/accelerators/accelerator.h
+++ b/ui/base/accelerators/accelerator.h
@@ -54,6 +54,7 @@ class UI_BASE_EXPORT Accelerator {
bool IsCtrlDown() const;
bool IsAltDown() const;
bool IsCmdDown() const;
+ bool IsRepeat() const;
// Returns a string with the localized shortcut if any.
base::string16 GetShortcutText() const;
@@ -67,6 +68,7 @@ class UI_BASE_EXPORT Accelerator {
return platform_accelerator_.get();
}
+ void set_is_repeat(bool is_repeat) { is_repeat_ = is_repeat; }
protected:
// The keycode (VK_...).
@@ -78,6 +80,9 @@ class UI_BASE_EXPORT Accelerator {
// The state of the Shift/Ctrl/Alt keys.
int modifiers_;
+ // True if the accelerator is created for an auto repeated key event.
+ bool is_repeat_;
+
// Stores platform specific data. May be NULL.
scoped_ptr<PlatformAccelerator> platform_accelerator_;
};
« no previous file with comments | « chrome/browser/chromeos/events/event_rewriter_unittest.cc ('k') | ui/base/accelerators/accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698