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

Side by Side Diff: ash/ash_touch_exploration_manager_chromeos.cc

Issue 2808053004: Fire accessibilityPrivate events on two-finger hold gesture. (Closed)
Patch Set: Rebase Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/ash_touch_exploration_manager_chromeos.h" 5 #include "ash/ash_touch_exploration_manager_chromeos.h"
6 6
7 #include "ash/accessibility_delegate.h" 7 #include "ash/accessibility_delegate.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shared/app_types.h" 9 #include "ash/shared/app_types.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 void AshTouchExplorationManager::OnDisplayMetricsChanged( 99 void AshTouchExplorationManager::OnDisplayMetricsChanged(
100 const display::Display& display, 100 const display::Display& display,
101 uint32_t changed_metrics) { 101 uint32_t changed_metrics) {
102 if (root_window_controller_->GetWindow()->GetDisplayNearestWindow().id() == 102 if (root_window_controller_->GetWindow()->GetDisplayNearestWindow().id() ==
103 display.id()) 103 display.id())
104 UpdateTouchExplorationState(); 104 UpdateTouchExplorationState();
105 } 105 }
106 106
107 void AshTouchExplorationManager::OnTwoFingerTouchStart() {
108 AccessibilityDelegate* delegate =
109 Shell::GetInstance()->accessibility_delegate();
110 delegate->OnTwoFingerTouchStart();
111 }
112
113 void AshTouchExplorationManager::OnTwoFingerTouchStop() {
114 AccessibilityDelegate* delegate =
115 Shell::GetInstance()->accessibility_delegate();
116 delegate->OnTwoFingerTouchStart();
117 }
118
107 void AshTouchExplorationManager::PlaySpokenFeedbackToggleCountdown( 119 void AshTouchExplorationManager::PlaySpokenFeedbackToggleCountdown(
108 int tick_count) { 120 int tick_count) {
109 AccessibilityDelegate* delegate = Shell::Get()->accessibility_delegate(); 121 AccessibilityDelegate* delegate = Shell::Get()->accessibility_delegate();
110 if (delegate->ShouldToggleSpokenFeedbackViaTouch()) 122 if (delegate->ShouldToggleSpokenFeedbackViaTouch())
111 delegate->PlaySpokenFeedbackToggleCountdown(tick_count); 123 delegate->PlaySpokenFeedbackToggleCountdown(tick_count);
112 } 124 }
113 125
114 void AshTouchExplorationManager::ToggleSpokenFeedback() { 126 void AshTouchExplorationManager::ToggleSpokenFeedback() {
115 AccessibilityDelegate* delegate = Shell::Get()->accessibility_delegate(); 127 AccessibilityDelegate* delegate = Shell::Get()->accessibility_delegate();
116 if (delegate->ShouldToggleSpokenFeedbackViaTouch()) 128 if (delegate->ShouldToggleSpokenFeedbackViaTouch())
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 touch_exploration_controller_.reset(); 182 touch_exploration_controller_.reset();
171 } 183 }
172 } 184 }
173 185
174 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { 186 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() {
175 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 187 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
176 chromeos::switches::kDisableVolumeAdjustSound); 188 chromeos::switches::kDisableVolumeAdjustSound);
177 } 189 }
178 190
179 } // namespace ash 191 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698