Chromium Code Reviews| Index: chrome/browser/chromeos/arc/intent_helper/arc_settings_service.cc |
| diff --git a/chrome/browser/chromeos/arc/intent_helper/arc_settings_service.cc b/chrome/browser/chromeos/arc/intent_helper/arc_settings_service.cc |
| index 552675f6388e5544bad9b091392a1489598deee5..45d83c66cc1ab4c8b36f93b9f754c760a5ba75fd 100644 |
| --- a/chrome/browser/chromeos/arc/intent_helper/arc_settings_service.cc |
| +++ b/chrome/browser/chromeos/arc/intent_helper/arc_settings_service.cc |
| @@ -118,6 +118,7 @@ class ArcSettingsServiceImpl |
| // Send settings that need to be synced only on Android first start to |
| // Android. |
| void SyncInitialSettings() const; |
| + void SyncFocusHighlightEnabled() const; |
| void SyncFontSize() const; |
| void SyncLocale() const; |
| void SyncProxySettings() const; |
| @@ -195,6 +196,7 @@ void ArcSettingsServiceImpl::StartObservingSettingsChanges() { |
| AddPrefToObserve(onc::prefs::kDeviceOpenNetworkConfiguration); |
| AddPrefToObserve(onc::prefs::kOpenNetworkConfiguration); |
| AddPrefToObserve(prefs::kAccessibilityVirtualKeyboardEnabled); |
| + AddPrefToObserve(prefs::kAccessibilityFocusHighlightEnabled); |
|
Luis Héctor Chávez
2017/01/19 17:17:56
nit: Can you sort these lexicographically?
yawano
2017/01/20 06:52:31
Done.
|
| reporting_consent_subscription_ = CrosSettings::Get()->AddSettingsObserver( |
| chromeos::kStatsReportingPref, |
| @@ -235,6 +237,7 @@ void ArcSettingsServiceImpl::SyncRuntimeSettings() const { |
| SyncTimeZone(); |
| SyncUse24HourClock(); |
| SyncAccessibilityVirtualKeyboardEnabled(); |
| + SyncFocusHighlightEnabled(); |
|
Luis Héctor Chávez
2017/01/19 17:17:56
nit: sort lexicographically
yawano
2017/01/20 06:52:31
Done.
|
| const PrefService* const prefs = |
| ProfileManager::GetActiveUserProfile()->GetPrefs(); |
| @@ -273,7 +276,9 @@ void ArcSettingsServiceImpl::AdapterPoweredChanged( |
| } |
| void ArcSettingsServiceImpl::OnPrefChanged(const std::string& pref_name) const { |
| - if (pref_name == prefs::kAccessibilitySpokenFeedbackEnabled) { |
| + if (pref_name == prefs::kAccessibilityFocusHighlightEnabled) { |
| + SyncFocusHighlightEnabled(); |
| + } else if (pref_name == prefs::kAccessibilitySpokenFeedbackEnabled) { |
| SyncSpokenFeedbackEnabled(); |
| } else if (pref_name == prefs::kWebKitDefaultFixedFontSize || |
| pref_name == prefs::kWebKitDefaultFontSize || |
| @@ -342,6 +347,12 @@ void ArcSettingsServiceImpl::SendBoolPrefSettingsBroadcast( |
| SendSettingsBroadcast(action, extras); |
| } |
| +void ArcSettingsServiceImpl::SyncFocusHighlightEnabled() const { |
| + SendBoolPrefSettingsBroadcast( |
| + prefs::kAccessibilityFocusHighlightEnabled, |
| + "org.chromium.arc.intent_helper.SET_FOCUS_HIGHLIGHT_ENABLED"); |
| +} |
| + |
| void ArcSettingsServiceImpl::SyncSpokenFeedbackEnabled() const { |
| SendBoolPrefSettingsBroadcast( |
| prefs::kAccessibilitySpokenFeedbackEnabled, |