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

Side by Side Diff: ash/ash_touch_exploration_manager_chromeos.h

Issue 2535723008: Revert "Toggle spoken feedback if two fingers are held down." (Closed)
Patch Set: Don't revert metrics changes Created 4 years 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
« no previous file with comments | « no previous file | ash/ash_touch_exploration_manager_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/common/system/accessibility_observer.h" 11 #include "ash/common/system/accessibility_observer.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "ui/chromeos/touch_accessibility_enabler.h"
14 #include "ui/chromeos/touch_exploration_controller.h" 13 #include "ui/chromeos/touch_exploration_controller.h"
15 #include "ui/display/display_observer.h" 14 #include "ui/display/display_observer.h"
16 #include "ui/wm/public/activation_change_observer.h" 15 #include "ui/wm/public/activation_change_observer.h"
17 16
18 namespace chromeos { 17 namespace chromeos {
19 class CrasAudioHandler; 18 class CrasAudioHandler;
20 } 19 }
21 20
22 namespace ash { 21 namespace ash {
23 class RootWindowController; 22 class RootWindowController;
24 23
25 // Responsible for initializing TouchExplorationController when spoken 24 // Responsible for initializing TouchExplorationController when spoken
26 // feedback is on for ChromeOS only. This class implements 25 // feedback is on for ChromeOS only. This class implements
27 // TouchExplorationControllerDelegate which allows touch gestures to manipulate 26 // TouchExplorationControllerDelegate which allows touch gestures to manipulate
28 // the system. 27 // the system.
29 class ASH_EXPORT AshTouchExplorationManager 28 class ASH_EXPORT AshTouchExplorationManager
30 : public AccessibilityObserver, 29 : public AccessibilityObserver,
31 public ui::TouchExplorationControllerDelegate, 30 public ui::TouchExplorationControllerDelegate,
32 public ui::TouchAccessibilityEnablerDelegate,
33 public display::DisplayObserver, 31 public display::DisplayObserver,
34 public aura::client::ActivationChangeObserver { 32 public aura::client::ActivationChangeObserver {
35 public: 33 public:
36 explicit AshTouchExplorationManager( 34 explicit AshTouchExplorationManager(
37 RootWindowController* root_window_controller); 35 RootWindowController* root_window_controller);
38 ~AshTouchExplorationManager() override; 36 ~AshTouchExplorationManager() override;
39 37
40 // AccessibilityObserver overrides: 38 // AccessibilityObserver overrides:
41 void OnAccessibilityModeChanged( 39 void OnAccessibilityModeChanged(
42 AccessibilityNotificationVisibility notify) override; 40 AccessibilityNotificationVisibility notify) override;
43 41
44 // TouchExplorationControllerDelegate overrides: 42 // TouchExplorationControllerDelegate overrides:
45 void SetOutputLevel(int volume) override; 43 void SetOutputLevel(int volume) override;
46 void SilenceSpokenFeedback() override; 44 void SilenceSpokenFeedback() override;
47 void PlayVolumeAdjustEarcon() override; 45 void PlayVolumeAdjustEarcon() override;
48 void PlayPassthroughEarcon() override; 46 void PlayPassthroughEarcon() override;
49 void PlayExitScreenEarcon() override; 47 void PlayExitScreenEarcon() override;
50 void PlayEnterScreenEarcon() override; 48 void PlayEnterScreenEarcon() override;
51 void HandleAccessibilityGesture(ui::AXGesture gesture) override; 49 void HandleAccessibilityGesture(ui::AXGesture gesture) override;
52 50
53 // display::DisplayObserver overrides: 51 // display::DisplayObserver overrides:
54 void OnDisplayMetricsChanged(const display::Display& display, 52 void OnDisplayMetricsChanged(const display::Display& display,
55 uint32_t changed_metrics) override; 53 uint32_t changed_metrics) override;
56 54
57 // TouchAccessibilityEnablerDelegate overrides:
58 void PlaySpokenFeedbackToggleCountdown(int tick_count) override;
59 void ToggleSpokenFeedback() override;
60
61 // aura::client::ActivationChangeObserver overrides: 55 // aura::client::ActivationChangeObserver overrides:
62 void OnWindowActivated( 56 void OnWindowActivated(
63 aura::client::ActivationChangeObserver::ActivationReason reason, 57 aura::client::ActivationChangeObserver::ActivationReason reason,
64 aura::Window* gained_active, 58 aura::Window* gained_active,
65 aura::Window* lost_active) override; 59 aura::Window* lost_active) override;
66 60
67 // Update the touch exploration controller so that synthesized touch 61 // Update the touch exploration controller so that synthesized touch
68 // events are anchored at this point. 62 // events are anchored at this point.
69 void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point); 63 void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point);
70 64
71 private: 65 private:
72 void UpdateTouchExplorationState(); 66 void UpdateTouchExplorationState();
73 bool VolumeAdjustSoundEnabled(); 67 bool VolumeAdjustSoundEnabled();
74 68
75 std::unique_ptr<ui::TouchExplorationController> touch_exploration_controller_; 69 std::unique_ptr<ui::TouchExplorationController> touch_exploration_controller_;
76 std::unique_ptr<ui::TouchAccessibilityEnabler> touch_accessibility_enabler_;
77 RootWindowController* root_window_controller_; 70 RootWindowController* root_window_controller_;
78 chromeos::CrasAudioHandler* audio_handler_; 71 chromeos::CrasAudioHandler* audio_handler_;
79 72
80 DISALLOW_COPY_AND_ASSIGN(AshTouchExplorationManager); 73 DISALLOW_COPY_AND_ASSIGN(AshTouchExplorationManager);
81 }; 74 };
82 75
83 } // namespace ash 76 } // namespace ash
84 77
85 #endif // ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_ 78 #endif // ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | ash/ash_touch_exploration_manager_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698