OLD | NEW |
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 Loading... |
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 = Shell::Get()->accessibility_delegate(); |
| 109 delegate->OnTwoFingerTouchStart(); |
| 110 } |
| 111 |
| 112 void AshTouchExplorationManager::OnTwoFingerTouchStop() { |
| 113 AccessibilityDelegate* delegate = Shell::Get()->accessibility_delegate(); |
| 114 delegate->OnTwoFingerTouchStart(); |
| 115 } |
| 116 |
107 void AshTouchExplorationManager::PlaySpokenFeedbackToggleCountdown( | 117 void AshTouchExplorationManager::PlaySpokenFeedbackToggleCountdown( |
108 int tick_count) { | 118 int tick_count) { |
109 AccessibilityDelegate* delegate = Shell::Get()->accessibility_delegate(); | 119 AccessibilityDelegate* delegate = Shell::Get()->accessibility_delegate(); |
110 if (delegate->ShouldToggleSpokenFeedbackViaTouch()) | 120 if (delegate->ShouldToggleSpokenFeedbackViaTouch()) |
111 delegate->PlaySpokenFeedbackToggleCountdown(tick_count); | 121 delegate->PlaySpokenFeedbackToggleCountdown(tick_count); |
112 } | 122 } |
113 | 123 |
114 void AshTouchExplorationManager::ToggleSpokenFeedback() { | 124 void AshTouchExplorationManager::ToggleSpokenFeedback() { |
115 AccessibilityDelegate* delegate = Shell::Get()->accessibility_delegate(); | 125 AccessibilityDelegate* delegate = Shell::Get()->accessibility_delegate(); |
116 if (delegate->ShouldToggleSpokenFeedbackViaTouch()) | 126 if (delegate->ShouldToggleSpokenFeedbackViaTouch()) |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 touch_exploration_controller_.reset(); | 180 touch_exploration_controller_.reset(); |
171 } | 181 } |
172 } | 182 } |
173 | 183 |
174 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { | 184 bool AshTouchExplorationManager::VolumeAdjustSoundEnabled() { |
175 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 185 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
176 chromeos::switches::kDisableVolumeAdjustSound); | 186 chromeos::switches::kDisableVolumeAdjustSound); |
177 } | 187 } |
178 | 188 |
179 } // namespace ash | 189 } // namespace ash |
OLD | NEW |