summaryrefslogtreecommitdiffstats
path: root/ash/ash_touch_exploration_manager_chromeos.h
diff options
context:
space:
mode:
authorlisayin@chromium.org <lisayin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-23 00:10:27 +0000
committerlisayin@chromium.org <lisayin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-23 00:10:27 +0000
commitac355c54025416c2f8ab8f9d6eaabe45c1a513d0 (patch)
tree06b498f5e86433e908758b264f61bfe15170da81 /ash/ash_touch_exploration_manager_chromeos.h
parent04c3b4585ba8cfdfe09345dc9033045aadd1b365 (diff)
downloadchromium_src-ac355c54025416c2f8ab8f9d6eaabe45c1a513d0.zip
chromium_src-ac355c54025416c2f8ab8f9d6eaabe45c1a513d0.tar.gz
chromium_src-ac355c54025416c2f8ab8f9d6eaabe45c1a513d0.tar.bz2
Added side slide gestures to touch exploration controller.
The user can control settings that might be normally changed using sliders by sliding along the edge of the screen when ChromeVox is on. For example, the user can slide along the right edge of the screen and adjust the volume. If the user enters this mode and leaves the boundaries without releasing their touch, they will stop adjusting the setting, however, they will not enter touch exploration. If they return to the given boundaries, they will be able to modify the setting again. If the user does not touch a "hot edge" of the screen, they will not enter this state if they move to the an of the screen. BUG=393326 Review URL: https://codereview.chromium.org/385073009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/ash_touch_exploration_manager_chromeos.h')
-rw-r--r--ash/ash_touch_exploration_manager_chromeos.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/ash/ash_touch_exploration_manager_chromeos.h b/ash/ash_touch_exploration_manager_chromeos.h
new file mode 100644
index 0000000..fc9cbc1
--- /dev/null
+++ b/ash/ash_touch_exploration_manager_chromeos.h
@@ -0,0 +1,52 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_
+#define ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_
+
+#include "ash/ash_export.h"
+#include "ash/system/tray_accessibility.h"
+#include "ui/chromeos/touch_exploration_controller.h"
+
+namespace chromeos {
+class CrasAudioHandler;
+}
+
+namespace ash {
+class RootWindowController;
+
+// Responsible for initializing TouchExplorationController when spoken
+// feedback is on for ChromeOS only. This class implements
+// TouchExplorationControllerDelegate which allows touch gestures to manipulate
+// the system.
+class ASH_EXPORT AshTouchExplorationManager
+ : public ash::AccessibilityObserver,
+ public ui::TouchExplorationControllerDelegate {
+ public:
+ explicit AshTouchExplorationManager(
+ RootWindowController* root_window_controller);
+ virtual ~AshTouchExplorationManager();
+
+ // AccessibilityObserver overrides:
+ virtual void OnAccessibilityModeChanged(
+ AccessibilityNotificationVisibility notify) OVERRIDE;
+
+ // TouchExplorationControllerDelegate overrides:
+ virtual void PlayVolumeAdjustSound() OVERRIDE;
+ virtual void SetOutputLevel(int volume) OVERRIDE;
+
+ private:
+ void UpdateTouchExplorationState();
+ bool VolumeAdjustSoundEnabled();
+
+ scoped_ptr<ui::TouchExplorationController> touch_exploration_controller_;
+ RootWindowController* root_window_controller_;
+ chromeos::CrasAudioHandler* audio_handler_;
+
+ DISALLOW_COPY_AND_ASSIGN(AshTouchExplorationManager);
+};
+
+} // namespace ash
+
+#endif // ASH_TOUCH_EXPLORATION_MANAGER_CHROMEOS_H_