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

Unified Diff: chrome/browser/chromeos/arc/intent_helper/arc_settings_service.cc

Issue 2559663002: Support focus highlight in Android window (Closed)
Patch Set: Fix comments and style. Created 3 years, 11 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/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,

Powered by Google App Engine
This is Rietveld 408576698