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

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

Issue 2216433004: Add skeleton for select-to-speak component extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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/accessibility_manager.cc
diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.cc b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
index f18de79161647198cefec585d11aa351e5d73e28..e7f6dc5c69094fc71722772f4b8f2cee21938130 100644
--- a/chrome/browser/chromeos/accessibility/accessibility_manager.cc
+++ b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
@@ -304,6 +304,10 @@ AccessibilityManager::AccessibilityManager()
resources_path.Append(extension_misc::kChromeVoxExtensionPath),
base::Bind(&AccessibilityManager::PostUnloadChromeVox,
weak_ptr_factory_.GetWeakPtr())));
+ select_to_speak_loader_ = base::WrapUnique(new AccessibilityExtensionLoader(
+ extension_misc::kSelectToSpeakExtensionId,
+ resources_path.Append(extension_misc::kSelectToSpeakExtensionPath),
+ base::Closure()));
}
AccessibilityManager::~AccessibilityManager() {
@@ -839,7 +843,11 @@ void AccessibilityManager::UpdateSelectToSpeakFromPref() {
return;
select_to_speak_enabled_ = enabled;
- // TODO(dmazzoni): implement feature here.
+ if (enabled) {
+ select_to_speak_loader_->Load(profile_, "", base::Closure());
David Tseng 2016/09/16 21:16:02 "" /* param_name */
dmazzoni 2016/09/16 22:06:20 Done
+ } else {
+ select_to_speak_loader_->Unload();
+ }
}
void AccessibilityManager::SetSwitchAccessEnabled(bool enabled) {

Powered by Google App Engine
This is Rietveld 408576698