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

Unified Diff: chrome/browser/chromeos/events/event_rewriter.h

Issue 653423004: Suppress Xorg generated key repeat events for Hotrod remote (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fixes Created 6 years, 2 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 | chrome/browser/chromeos/events/event_rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/events/event_rewriter.h
diff --git a/chrome/browser/chromeos/events/event_rewriter.h b/chrome/browser/chromeos/events/event_rewriter.h
index aae5de038bcef078f4c9a8e595fd5c929bab695b..36044aa2e2b2a0dd3e1f8f3670233b5720d34489 100644
--- a/chrome/browser/chromeos/events/event_rewriter.h
+++ b/chrome/browser/chromeos/events/event_rewriter.h
@@ -41,6 +41,8 @@ class EventRewriter : public ui::EventRewriter {
enum DeviceType {
kDeviceUnknown = 0,
kDeviceAppleKeyboard,
+ kDeviceHotrodRemote,
+ kDeviceVirtualCoreKeyboard, // X-server generated events.
};
// Does not take ownership of the |sticky_keys_controller|, which may also
@@ -108,15 +110,21 @@ class EventRewriter : public ui::EventRewriter {
const PrefService* GetPrefService() const;
// Adds a device to |device_id_to_type_|.
- void KeyboardDeviceAdded(int device_id);
+ DeviceType KeyboardDeviceAdded(int device_id);
- // Checks the type of the |device_name|, and inserts a new entry to
- // |device_id_to_type_|.
+ // Checks the type of the |device_name|, |vendor_id| and |product_id|, and
+ // inserts a new entry to |device_id_to_type_|.
DeviceType KeyboardDeviceAddedInternal(int device_id,
- const std::string& device_name);
+ const std::string& device_name,
+ int vendor_id,
+ int product_id);
// Returns true if |last_keyboard_device_id_| is Apple's.
bool IsAppleKeyboard() const;
+ // Returns true if |last_keyboard_device_id_| is Hotrod remote.
+ bool IsHotrodRemote() const;
+ // Returns true if |last_keyboard_device_id_| is of given |device_type|.
+ bool IsLastKeyboardOfType(DeviceType device_type) const;
// Returns true if the target for |event| would prefer to receive raw function
// keys instead of having them rewritten into back, forward, brightness,
« no previous file with comments | « no previous file | chrome/browser/chromeos/events/event_rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698