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

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

Issue 2735413002: Select-to-speak event handler should be on root window, not ash Shell. (Closed)
Patch Set: Get rid of unrelated changes Created 3 years, 9 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 | no next file » | 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.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 e4d237ae8fb8e947013ee1efcb0815a1f5857e35..4bc5f681e16cd6d90e1f33291c6f2ffbe1cf7cee 100644
--- a/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc
+++ b/chrome/browser/chromeos/accessibility/select_to_speak_event_handler.cc
@@ -19,13 +19,17 @@
namespace chromeos {
SelectToSpeakEventHandler::SelectToSpeakEventHandler() {
- if (ash::Shell::HasInstance())
- ash::Shell::GetInstance()->AddPreTargetHandler(this);
+ if (ash::Shell::HasInstance()) {
+ ash::Shell::GetInstance()->GetPrimaryRootWindow()->AddPreTargetHandler(
+ this);
+ }
}
SelectToSpeakEventHandler::~SelectToSpeakEventHandler() {
- if (ash::Shell::HasInstance())
- ash::Shell::GetInstance()->RemovePreTargetHandler(this);
+ if (ash::Shell::HasInstance()) {
+ ash::Shell::GetInstance()->GetPrimaryRootWindow()->RemovePreTargetHandler(
+ this);
+ }
}
void SelectToSpeakEventHandler::OnKeyEvent(ui::KeyEvent* event) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698