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

Unified Diff: chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h

Issue 2698273002: Select-to-speak: Stop speech when tapping Search or Control (Closed)
Patch Set: Trigger on tap and release of Search or Control Created 3 years, 10 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/accessibility/select_to_speak_event_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10f2c756834399c9ad6820dc1e2b9aae22efd7cb..012fb9e3a7af6d3ef53093d9f1f9dd3942103dbd 100644
--- a/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h
+++ b/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h
@@ -5,8 +5,11 @@
#ifndef CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SELECT_TO_SPEAK_EVENT_HANDLER_H_
#define CHROME_BROWSER_CHROMEOS_ACCESSIBILITY_SELECT_TO_SPEAK_EVENT_HANDLER_H_
+#include <set>
+
#include "base/macros.h"
#include "ui/events/event_handler.h"
+#include "ui/events/keycodes/keyboard_codes.h"
namespace chromeos {
@@ -52,6 +55,13 @@ class SelectToSpeakEventHandler : public ui::EventHandler {
State state_ = INACTIVE;
+ // 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_;
+
int last_view_storage_id_ = 0;
DISALLOW_COPY_AND_ASSIGN(SelectToSpeakEventHandler);
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698