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 #ifndef ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_ | 5 #ifndef ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_ |
6 #define ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_ | 6 #define ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/system/tray_accessibility.h" | 9 #include "ash/system/tray_accessibility.h" |
10 #include "ui/chromeos/touch_exploration_controller.h" | 10 #include "ui/chromeos/touch_exploration_controller.h" |
11 | 11 |
12 namespace chromeos { | 12 namespace chromeos { |
13 class CrasAudioHandler; | 13 class CrasAudioHandler; |
14 } | 14 } |
15 | 15 |
16 namespace ash { | 16 namespace ash { |
17 class RootWindowController; | 17 class RootWindowController; |
18 | 18 |
19 // Responsible for initializing TouchExplorationController when spoken | 19 // Responsible for initializing TouchExplorationController when spoken |
20 // feedback is on for ChromeOS only. This class implements | 20 // feedback is on for ChromeOS only. This class implements |
21 // TouchExplorationControllerDelegate which allows touch gestures to manipulate | 21 // TouchExplorationControllerDelegate which allows touch gestures to manipulate |
22 // the system. | 22 // the system. |
23 class ASH_EXPORT AshTouchExplorationManager | 23 class ASH_EXPORT AshTouchExplorationManager |
24 : public ash::AccessibilityObserver, | 24 : public ash::AccessibilityObserver, |
25 public ui::TouchExplorationControllerDelegate { | 25 public ui::TouchExplorationControllerDelegate { |
26 public: | 26 public: |
27 explicit AshTouchExplorationManager( | 27 explicit AshTouchExplorationManager( |
28 RootWindowController* root_window_controller); | 28 RootWindowController* root_window_controller); |
29 virtual ~AshTouchExplorationManager(); | 29 ~AshTouchExplorationManager() override; |
30 | 30 |
31 // AccessibilityObserver overrides: | 31 // AccessibilityObserver overrides: |
32 virtual void OnAccessibilityModeChanged( | 32 void OnAccessibilityModeChanged( |
33 ui::AccessibilityNotificationVisibility notify) override; | 33 ui::AccessibilityNotificationVisibility notify) override; |
34 | 34 |
35 // TouchExplorationControllerDelegate overrides: | 35 // TouchExplorationControllerDelegate overrides: |
36 virtual void SetOutputLevel(int volume) override; | 36 void SetOutputLevel(int volume) override; |
37 virtual void SilenceSpokenFeedback() override; | 37 void SilenceSpokenFeedback() override; |
38 virtual void PlayVolumeAdjustEarcon() override; | 38 void PlayVolumeAdjustEarcon() override; |
39 virtual void PlayPassthroughEarcon() override; | 39 void PlayPassthroughEarcon() override; |
40 virtual void PlayExitScreenEarcon() override; | 40 void PlayExitScreenEarcon() override; |
41 virtual void PlayEnterScreenEarcon() override; | 41 void PlayEnterScreenEarcon() override; |
42 | 42 |
43 private: | 43 private: |
44 void UpdateTouchExplorationState(); | 44 void UpdateTouchExplorationState(); |
45 bool VolumeAdjustSoundEnabled(); | 45 bool VolumeAdjustSoundEnabled(); |
46 | 46 |
47 scoped_ptr<ui::TouchExplorationController> touch_exploration_controller_; | 47 scoped_ptr<ui::TouchExplorationController> touch_exploration_controller_; |
48 RootWindowController* root_window_controller_; | 48 RootWindowController* root_window_controller_; |
49 chromeos::CrasAudioHandler* audio_handler_; | 49 chromeos::CrasAudioHandler* audio_handler_; |
50 | 50 |
51 DISALLOW_COPY_AND_ASSIGN(AshTouchExplorationManager); | 51 DISALLOW_COPY_AND_ASSIGN(AshTouchExplorationManager); |
52 }; | 52 }; |
53 | 53 |
54 } // namespace ash | 54 } // namespace ash |
55 | 55 |
56 #endif // ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_ | 56 #endif // ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_ |
OLD | NEW |