 Chromium Code Reviews
 Chromium Code Reviews Issue 14473011:
  Adds new experimental accessibility extension api to enable or disable native accessibility.  (Closed) 
  Base URL: http://git.chromium.org/chromium/src.git@master
    
  
    Issue 14473011:
  Adds new experimental accessibility extension api to enable or disable native accessibility.  (Closed) 
  Base URL: http://git.chromium.org/chromium/src.git@master| 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 "base/callback_forward.h" | 8 #include "base/callback_forward.h" | 
| 9 | |
| 
jam
2013/05/02 22:34:06
nit: no blank line
 | |
| 9 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" | 
| 10 | 11 | 
| 11 namespace content { | 12 namespace content { | 
| 12 | 13 | 
| 13 // The BrowserAccessibilityState class is used to determine if the browser | 14 // The BrowserAccessibilityState class is used to determine if the browser | 
| 14 // should be customized for users with assistive technology, such as screen | 15 // should be customized for users with assistive technology, such as screen | 
| 15 // readers. | 16 // readers. | 
| 16 class CONTENT_EXPORT BrowserAccessibilityState { | 17 class CONTENT_EXPORT BrowserAccessibilityState { | 
| 17 public: | 18 public: | 
| 18 virtual ~BrowserAccessibilityState() { } | 19 virtual ~BrowserAccessibilityState() { } | 
| 19 | 20 | 
| 20 // Returns the singleton instance. | 21 // Returns the singleton instance. | 
| 21 static BrowserAccessibilityState* GetInstance(); | 22 static BrowserAccessibilityState* GetInstance(); | 
| 22 | 23 | 
| 23 // Called when accessibility is enabled manually (via command-line flag). | 24 // Enables accessibility for all running tabs. | 
| 
jam
2013/05/02 22:34:06
nit: don't mention tabs in content, since that's a
 | |
| 24 virtual void OnAccessibilityEnabledManually() = 0; | 25 virtual void EnableAccessibility() = 0; | 
| 26 | |
| 27 // Disables accessibility for all running tabs. | |
| 28 virtual void DisableAccessibility() = 0; | |
| 25 | 29 | 
| 26 // Called when screen reader client is detected. | 30 // Called when screen reader client is detected. | 
| 27 virtual void OnScreenReaderDetected() = 0; | 31 virtual void OnScreenReaderDetected() = 0; | 
| 28 | 32 | 
| 29 // Returns true if the browser should be customized for accessibility. | 33 // Returns true if the browser should be customized for accessibility. | 
| 30 virtual bool IsAccessibleBrowser() = 0; | 34 virtual bool IsAccessibleBrowser() = 0; | 
| 31 | 35 | 
| 32 // Add a callback method that will be called once, a small while after the | 36 // Add a callback method that will be called once, a small while after the | 
| 33 // browser starts up, when accessibility state histograms are updated. | 37 // browser starts up, when accessibility state histograms are updated. | 
| 34 // Use this to register a method to update additional accessibility | 38 // Use this to register a method to update additional accessibility | 
| 35 // histograms. | 39 // histograms. | 
| 36 virtual void AddHistogramCallback(base::Closure callback) = 0; | 40 virtual void AddHistogramCallback(base::Closure callback) = 0; | 
| 37 | 41 | 
| 38 virtual void UpdateHistogramsForTesting() = 0; | 42 virtual void UpdateHistogramsForTesting() = 0; | 
| 39 }; | 43 }; | 
| 40 | 44 | 
| 41 } // namespace content | 45 } // namespace content | 
| 42 | 46 | 
| 43 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_ | 47 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_ | 
| OLD | NEW |