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

Side by Side Diff: content/public/browser/browser_accessibility_state.h

Issue 145283003: Switch AccessibilityMode to be a bitmap (Closed) Base URL: https://chromium.googlesource.com/chromium/src@enable
Patch Set: Switch IPC value to be the enum, rather than unsigned int Created 6 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 9
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 // The BrowserAccessibilityState class is used to determine if the browser 14 // The BrowserAccessibilityState class is used to determine if the browser
15 // should be customized for users with assistive technology, such as screen 15 // should be customized for users with assistive technology, such as screen
16 // readers. 16 // readers.
17 class CONTENT_EXPORT BrowserAccessibilityState { 17 class CONTENT_EXPORT BrowserAccessibilityState {
18 public: 18 public:
19 virtual ~BrowserAccessibilityState() { } 19 virtual ~BrowserAccessibilityState() { }
20 20
21 // Returns the singleton instance. 21 // Returns the singleton instance.
22 static BrowserAccessibilityState* GetInstance(); 22 static BrowserAccessibilityState* GetInstance();
23 23
24 // Enables accessibility for all running tabs. 24 // Enables accessibility for all running tabs.
25 virtual void EnableAccessibility() = 0; 25 virtual void EnableAccessibility() = 0;
26 26
27 // Disables accessibility for all running tabs. 27 // Disables accessibility for all running tabs. (Only if accessibility is not
28 // required by a command line flag or by a platform requirement.)
28 virtual void DisableAccessibility() = 0; 29 virtual void DisableAccessibility() = 0;
29 30
31 // Resets accessibility to the platform default for all running tabs.
32 // This is probably off, but may be on, if --force_renderer_accessibility is
33 // passed, or EditableTextOnly if this is Win7.
34 virtual void ResetAccessibilityMode() = 0;
35
30 // Called when screen reader client is detected. 36 // Called when screen reader client is detected.
31 virtual void OnScreenReaderDetected() = 0; 37 virtual void OnScreenReaderDetected() = 0;
32 38
33 // Returns true if the browser should be customized for accessibility. 39 // Returns true if the browser should be customized for accessibility.
34 virtual bool IsAccessibleBrowser() = 0; 40 virtual bool IsAccessibleBrowser() = 0;
35 41
36 // Add a callback method that will be called once, a small while after the 42 // Add a callback method that will be called once, a small while after the
37 // browser starts up, when accessibility state histograms are updated. 43 // browser starts up, when accessibility state histograms are updated.
38 // Use this to register a method to update additional accessibility 44 // Use this to register a method to update additional accessibility
39 // histograms. 45 // histograms.
40 virtual void AddHistogramCallback(base::Closure callback) = 0; 46 virtual void AddHistogramCallback(base::Closure callback) = 0;
41 47
42 virtual void UpdateHistogramsForTesting() = 0; 48 virtual void UpdateHistogramsForTesting() = 0;
43 }; 49 };
44 50
45 } // namespace content 51 } // namespace content
46 52
47 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_ 53 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698