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

Unified Diff: ash/ash_touch_exploration_manager_chromeos.cc

Issue 2476843003: Toggle spoken feedback if two fingers are held down. (Closed)
Patch Set: Created 4 years, 1 month 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: ash/ash_touch_exploration_manager_chromeos.cc
diff --git a/ash/ash_touch_exploration_manager_chromeos.cc b/ash/ash_touch_exploration_manager_chromeos.cc
index 8eda21eebdac5d43bafa95e6e7d0744f40322b6b..4919f9332a35c875be5d2e30b97a0ea9fc3133fc 100644
--- a/ash/ash_touch_exploration_manager_chromeos.cc
+++ b/ash/ash_touch_exploration_manager_chromeos.cc
@@ -102,6 +102,17 @@ void AshTouchExplorationManager::OnDisplayMetricsChanged(
UpdateTouchExplorationState();
}
+void AshTouchExplorationManager::PlaySpokenFeedbackToggleCountdown(
+ int tick_count) {
+ WmShell::Get()->accessibility_delegate()->PlaySpokenFeedbackToggleCountdown(
+ tick_count);
+}
+
+void AshTouchExplorationManager::ToggleSpokenFeedback() {
+ WmShell::Get()->accessibility_delegate()->ToggleSpokenFeedback(
+ ash::A11Y_NOTIFICATION_SHOW);
+}
+
void AshTouchExplorationManager::OnWindowActivated(
aura::client::ActivationChangeObserver::ActivationReason reason,
aura::Window* gained_active,
@@ -150,6 +161,12 @@ void AshTouchExplorationManager::UpdateTouchExplorationState() {
} else {
touch_exploration_controller_.reset();
}
+
+ if (!touch_accessibility_enabler_) {
+ // Always enable gesture to toggle spoken feedback.
+ touch_accessibility_enabler_.reset(new ui::TouchAccessibilityEnabler(
+ root_window_controller_->GetRootWindow(), this));
+ }
}
bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() {

Powered by Google App Engine
This is Rietveld 408576698