Index: chrome/browser/chromeos/accessibility/switch_access_event_handler.h |
diff --git a/chrome/browser/chromeos/accessibility/switch_access_event_handler.h b/chrome/browser/chromeos/accessibility/switch_access_event_handler.h |
index 331f8363bbe4ae99c1e9284979c711a4db0cae68..4a45cf273d8e816c6a420b527bb786ca9d3d6591 100644 |
--- a/chrome/browser/chromeos/accessibility/switch_access_event_handler.h |
+++ b/chrome/browser/chromeos/accessibility/switch_access_event_handler.h |
@@ -5,6 +5,9 @@ |
#ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SWITCH_ACCESS_EVENT_HANDLER_H_ |
#define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SWITCH_ACCESS_EVENT_HANDLER_H_ |
+#include <string> |
Devlin
2017/05/30 19:22:03
not needed
elichtenberg
2017/05/31 00:58:43
Done.
|
+#include <unordered_set> |
+ |
#include "base/macros.h" |
#include "ui/events/event_handler.h" |
@@ -22,6 +25,8 @@ class SwitchAccessEventHandler : public ui::EventHandler { |
SwitchAccessEventHandler(); |
~SwitchAccessEventHandler() override; |
+ void SetKeysToCapture(const std::unordered_set<int>& key_codes); |
Devlin
2017/05/30 19:22:03
Any reason to use std::unordered_set over std::set
elichtenberg
2017/05/31 00:58:43
I believe unordered_sets are faster than sets. I t
Devlin
2017/05/31 01:33:32
"faster" depends entirely on data set size. The a
elichtenberg
2017/06/01 19:55:26
Fair point. Changed it to std::set.
|
+ |
private: |
// EventHandler: |
void OnKeyEvent(ui::KeyEvent* event) override; |
@@ -29,6 +34,8 @@ class SwitchAccessEventHandler : public ui::EventHandler { |
void CancelEvent(ui::Event* event); |
void DispatchKeyEventToSwitchAccess(const ui::KeyEvent& event); |
+ std::unordered_set<int> captured_keys_; |
+ |
DISALLOW_COPY_AND_ASSIGN(SwitchAccessEventHandler); |
}; |