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

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

Issue 2711343005: Set keys to traverse accessibility tree. Using focus ring to highlight selected node. (Closed)
Patch Set: Fixing closure compilation error 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
Index: chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc
diff --git a/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc b/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc
index 62ddc312c419c0806e3160f3ac60ede15079ff95..e4d237ae8fb8e947013ee1efcb0815a1f5857e35 100644
--- a/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc
+++ b/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/chromeos/accessibility/select_to_speak_event_handler.h"
#include "ash/shell.h"
+#include "base/logging.h"
#include "chrome/browser/speech/tts_controller.h"
#include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h"
#include "content/public/browser/browser_thread.h"
@@ -28,6 +29,8 @@ SelectToSpeakEventHandler::~SelectToSpeakEventHandler() {
}
void SelectToSpeakEventHandler::OnKeyEvent(ui::KeyEvent* event) {
+ DCHECK(event);
+
// We can only call TtsController on the UI thread, make sure we
// don't ever try to run this code on some other thread.
CHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
@@ -73,6 +76,7 @@ void SelectToSpeakEventHandler::OnKeyEvent(ui::KeyEvent* event) {
}
void SelectToSpeakEventHandler::OnMouseEvent(ui::MouseEvent* event) {
+ DCHECK(event);
if (state_ == INACTIVE)
return;
@@ -157,6 +161,7 @@ void SelectToSpeakEventHandler::OnMouseEvent(ui::MouseEvent* event) {
}
void SelectToSpeakEventHandler::CancelEvent(ui::Event* event) {
+ DCHECK(event);
if (event->cancelable()) {
event->SetHandled();
event->StopPropagation();

Powered by Google App Engine
This is Rietveld 408576698