OLD | NEW |
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 "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 // The BrowserAccessibilityState class is used to determine if the browser | 12 // The BrowserAccessibilityState class is used to determine if the browser |
13 // should be customized for users with assistive technology, such as screen | 13 // should be customized for users with assistive technology, such as screen |
14 // readers. | 14 // readers. |
15 class CONTENT_EXPORT BrowserAccessibilityState { | 15 class CONTENT_EXPORT BrowserAccessibilityState { |
16 public: | 16 public: |
17 virtual ~BrowserAccessibilityState() { } | 17 virtual ~BrowserAccessibilityState() { } |
18 | 18 |
19 // Returns the singleton instance. | 19 // Returns the singleton instance. |
20 static BrowserAccessibilityState* GetInstance(); | 20 static BrowserAccessibilityState* GetInstance(); |
21 | 21 |
22 // Called when accessibility is enabled manually (via command-line flag). | 22 // Called when accessibility is enabled manually (via command-line flag). |
23 virtual void OnAccessibilityEnabledManually() = 0; | 23 virtual void OnAccessibilityEnabledManually() = 0; |
24 | 24 |
25 // Called when screen reader client is detected. | 25 // Called when screen reader client is detected. |
26 virtual void OnScreenReaderDetected() = 0; | 26 virtual void OnScreenReaderDetected() = 0; |
27 | 27 |
28 // Returns true if the browser should be customized for accessibility. | 28 // Returns true if the browser should be customized for accessibility. |
29 virtual bool IsAccessibleBrowser() = 0; | 29 virtual bool IsAccessibleBrowser() = 0; |
| 30 |
| 31 // Add a callback method that will be called once, a small while after the |
| 32 // browser starts up, when accessibility state histograms are updated. |
| 33 // Use this to register a method to update additional accessibility |
| 34 // histograms. |
| 35 virtual void AddHistogramCallback(base::Closure callback) = 0; |
30 }; | 36 }; |
31 | 37 |
32 } // namespace content | 38 } // namespace content |
33 | 39 |
34 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_ | 40 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_ |
OLD | NEW |