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

Side by Side Diff: chrome/browser/chromeos/login/wizard_accessibility_handler.h

Issue 5839003: Fix to enable toggling accessibility using Ctrl+Alt+Z (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "chrome/browser/chromeos/cros/speech_synthesis_library.h"
12 #include "chrome/common/notification_observer.h" 13 #include "chrome/common/notification_observer.h"
13 #include "chrome/common/notification_source.h" 14 #include "chrome/common/notification_source.h"
14 #include "chrome/common/notification_type.h" 15 #include "chrome/common/notification_type.h"
15 16
16 class AccessibilityControlInfo; 17 class AccessibilityControlInfo;
17 class AccessibilityTextBoxInfo; 18 class AccessibilityTextBoxInfo;
18 19
19 namespace chromeos { 20 namespace chromeos {
20 21
21 enum EarconType {
22 NO_EARCON,
23 EARCON_BUTTON,
24 EARCON_CHECK_OFF,
25 EARCON_CHECK_ON,
26 EARCON_ELLIPSES,
27 EARCON_LINK,
28 EARCON_LISTBOX,
29 EARCON_MENU,
30 EARCON_OBJECT_OPENED,
31 EARCON_OBJECT_CLOSED,
32 EARCON_TAB,
33 EARCON_TEXTBOX,
34 };
35
36 // Class that handles the accessibility notifications and generates 22 // Class that handles the accessibility notifications and generates
37 // appropriate spoken/audio feedback. 23 // appropriate spoken/audio feedback.
38 class WizardAccessibilityHandler : public NotificationObserver { 24 class WizardAccessibilityHandler : public NotificationObserver {
39 public: 25 public:
40 WizardAccessibilityHandler() { } 26 WizardAccessibilityHandler() { }
41 27
42 // Speaks the specified string. 28 // Speaks the specified string.
43 void Speak(const char* speak_str, bool queue, bool interruptible); 29 void Speak(const char* speak_str, bool queue, bool interruptible);
44 30
31 // Plays the specified earcon
32 void PlayEarcon(EarconType earcon_type);
33
45 private: 34 private:
46 // Override from NotificationObserver. 35 // Override from NotificationObserver.
47 virtual void Observe(NotificationType type, 36 virtual void Observe(NotificationType type,
48 const NotificationSource& source, 37 const NotificationSource& source,
49 const NotificationDetails& details); 38 const NotificationDetails& details);
50 39
51 // Get text to speak and an earcon identifier (which may be NONE) for any 40 // Get text to speak and an earcon identifier (which may be NONE) for any
52 // accessibility event. 41 // accessibility event.
53 void DescribeAccessibilityEvent(NotificationType event_type, 42 void DescribeAccessibilityEvent(NotificationType event_type,
54 const AccessibilityControlInfo* control_info, 43 const AccessibilityControlInfo* control_info,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 friend class WizardAccessibilityHandlerTest; 79 friend class WizardAccessibilityHandlerTest;
91 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestFocusEvents); 80 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestFocusEvents);
92 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestTextEvents); 81 FRIEND_TEST_ALL_PREFIXES(WizardAccessibilityHandlerTest, TestTextEvents);
93 82
94 DISALLOW_COPY_AND_ASSIGN(WizardAccessibilityHandler); 83 DISALLOW_COPY_AND_ASSIGN(WizardAccessibilityHandler);
95 }; 84 };
96 85
97 } // namespace chromeos 86 } // namespace chromeos
98 87
99 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_ 88 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_ACCESSIBILITY_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698