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

Side by Side Diff: ash/ash_touch_exploration_manager_chromeos.h

Issue 2880043002: Implement touch exploration touch typing (Closed)
Patch Set: Add comments. Created 3 years, 6 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
« 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/shell_observer.h"
11 #include "ash/system/accessibility_observer.h" 12 #include "ash/system/accessibility_observer.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/scoped_observer.h"
13 #include "ui/chromeos/touch_accessibility_enabler.h" 15 #include "ui/chromeos/touch_accessibility_enabler.h"
14 #include "ui/chromeos/touch_exploration_controller.h" 16 #include "ui/chromeos/touch_exploration_controller.h"
15 #include "ui/display/display_observer.h" 17 #include "ui/display/display_observer.h"
18 #include "ui/keyboard/keyboard_controller_observer.h"
16 #include "ui/wm/public/activation_change_observer.h" 19 #include "ui/wm/public/activation_change_observer.h"
17 20
18 namespace chromeos { 21 namespace chromeos {
19 class CrasAudioHandler; 22 class CrasAudioHandler;
20 } 23 }
21 24
25 namespace keyboard {
26 class KeyboardController;
27 }
28
22 namespace ash { 29 namespace ash {
23 class RootWindowController; 30 class RootWindowController;
24 31
25 // Responsible for initializing TouchExplorationController when spoken 32 // Responsible for initializing TouchExplorationController when spoken
26 // feedback is on for ChromeOS only. This class implements 33 // feedback is on for ChromeOS only. This class implements
27 // TouchExplorationControllerDelegate which allows touch gestures to manipulate 34 // TouchExplorationControllerDelegate which allows touch gestures to manipulate
28 // the system. 35 // the system.
29 class ASH_EXPORT AshTouchExplorationManager 36 class ASH_EXPORT AshTouchExplorationManager
30 : public AccessibilityObserver, 37 : public AccessibilityObserver,
31 public ui::TouchExplorationControllerDelegate, 38 public ui::TouchExplorationControllerDelegate,
32 public ui::TouchAccessibilityEnablerDelegate, 39 public ui::TouchAccessibilityEnablerDelegate,
33 public display::DisplayObserver, 40 public display::DisplayObserver,
34 public aura::client::ActivationChangeObserver { 41 public aura::client::ActivationChangeObserver,
42 public keyboard::KeyboardControllerObserver,
43 public ShellObserver {
35 public: 44 public:
36 explicit AshTouchExplorationManager( 45 explicit AshTouchExplorationManager(
37 RootWindowController* root_window_controller); 46 RootWindowController* root_window_controller);
38 ~AshTouchExplorationManager() override; 47 ~AshTouchExplorationManager() override;
39 48
40 // AccessibilityObserver overrides: 49 // AccessibilityObserver overrides:
41 void OnAccessibilityModeChanged( 50 void OnAccessibilityModeChanged(
42 AccessibilityNotificationVisibility notify) override; 51 AccessibilityNotificationVisibility notify) override;
43 52
44 // TouchExplorationControllerDelegate overrides: 53 // TouchExplorationControllerDelegate overrides:
(...skipping 19 matching lines...) Expand all
64 void OnWindowActivated( 73 void OnWindowActivated(
65 aura::client::ActivationChangeObserver::ActivationReason reason, 74 aura::client::ActivationChangeObserver::ActivationReason reason,
66 aura::Window* gained_active, 75 aura::Window* gained_active,
67 aura::Window* lost_active) override; 76 aura::Window* lost_active) override;
68 77
69 // Update the touch exploration controller so that synthesized touch 78 // Update the touch exploration controller so that synthesized touch
70 // events are anchored at this point. 79 // events are anchored at this point.
71 void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point); 80 void SetTouchAccessibilityAnchorPoint(const gfx::Point& anchor_point);
72 81
73 private: 82 private:
83 // keyboard::KeyboardControllerObserver overrides:
84 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
85 void OnKeyboardClosed() override;
86
87 // ShellObserver overrides:
88 void OnVirtualKeyboardStateChanged(bool activated,
89 aura::Window* root_window) override;
90
74 void UpdateTouchExplorationState(); 91 void UpdateTouchExplorationState();
75 bool VolumeAdjustSoundEnabled(); 92 bool VolumeAdjustSoundEnabled();
76 93
77 std::unique_ptr<ui::TouchExplorationController> touch_exploration_controller_; 94 std::unique_ptr<ui::TouchExplorationController> touch_exploration_controller_;
78 std::unique_ptr<ui::TouchAccessibilityEnabler> touch_accessibility_enabler_; 95 std::unique_ptr<ui::TouchAccessibilityEnabler> touch_accessibility_enabler_;
79 RootWindowController* root_window_controller_; 96 RootWindowController* root_window_controller_;
80 chromeos::CrasAudioHandler* audio_handler_; 97 chromeos::CrasAudioHandler* audio_handler_;
81 const bool enable_chromevox_arc_support_; 98 const bool enable_chromevox_arc_support_;
99 ScopedObserver<keyboard::KeyboardController,
100 keyboard::KeyboardControllerObserver>
101 keyboard_observer_;
82 102
83 DISALLOW_COPY_AND_ASSIGN(AshTouchExplorationManager); 103 DISALLOW_COPY_AND_ASSIGN(AshTouchExplorationManager);
84 }; 104 };
85 105
86 } // namespace ash 106 } // namespace ash
87 107
88 #endif // ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_ 108 #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