Index: chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h |
diff --git a/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h b/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h |
index 21dbef0f1632e42fe62fc8cbe0a911520c9e8530..048e2cf83d5055ca4fa458efd3a069db383b8438 100644 |
--- a/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h |
+++ b/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h |
@@ -13,12 +13,6 @@ |
namespace chromeos { |
-class SelectToSpeakForwardedEventDelegateForTesting { |
- public: |
- virtual void OnForwardEventToSelectToSpeakExtension( |
- const ui::MouseEvent& event) = 0; |
-}; |
- |
// Intercepts mouse events while the Search key is held down, and sends |
// accessibility events to the Select-to-speak extension instead. |
class SelectToSpeakEventHandler : public ui::EventHandler { |
@@ -26,17 +20,13 @@ |
SelectToSpeakEventHandler(); |
~SelectToSpeakEventHandler() override; |
- // For testing, call the provided callback with any events that would have |
- // been forwarded to the Select-to-speak extension instead. |
- void CaptureForwardedEventsForTesting( |
- SelectToSpeakForwardedEventDelegateForTesting* delegate); |
- |
private: |
// EventHandler: |
void OnKeyEvent(ui::KeyEvent* event) override; |
void OnMouseEvent(ui::MouseEvent* event) override; |
void CancelEvent(ui::Event* event); |
+ void SendCancelAXEvent(); |
enum State { |
// Neither the Search key nor the mouse button are down. |
@@ -65,7 +55,12 @@ |
State state_ = INACTIVE; |
- SelectToSpeakForwardedEventDelegateForTesting* event_delegate_for_testing_; |
+ // The set of keys that are currently down. Updated whenever a key is |
+ // pressed or released. |
+ std::set<ui::KeyboardCode> keys_currently_down_; |
+ // The set of keys that have been pressed together. Updated whenever a key |
+ // is pressed, and only cleared when all keys are released. |
+ std::set<ui::KeyboardCode> keys_pressed_together_; |
DISALLOW_COPY_AND_ASSIGN(SelectToSpeakEventHandler); |
}; |