| 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_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_IMPL_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 virtual void OnAccessibilityEnabledManually() OVERRIDE; | 43 virtual void OnAccessibilityEnabledManually() OVERRIDE; |
| 44 virtual void OnScreenReaderDetected() OVERRIDE; | 44 virtual void OnScreenReaderDetected() OVERRIDE; |
| 45 virtual bool IsAccessibleBrowser() OVERRIDE; | 45 virtual bool IsAccessibleBrowser() OVERRIDE; |
| 46 virtual void AddHistogramCallback(base::Closure callback) OVERRIDE; | 46 virtual void AddHistogramCallback(base::Closure callback) OVERRIDE; |
| 47 | 47 |
| 48 virtual void UpdateHistogramsForTesting() OVERRIDE; | 48 virtual void UpdateHistogramsForTesting() OVERRIDE; |
| 49 | 49 |
| 50 AccessibilityMode GetAccessibilityMode(); | 50 AccessibilityMode GetAccessibilityMode(); |
| 51 void SetAccessibilityMode(AccessibilityMode mode); | 51 void SetAccessibilityMode(AccessibilityMode mode); |
| 52 | 52 |
| 53 virtual bool GetAccessibilityEnabled() OVERRIDE; |
| 54 virtual void SetAccessibilityEnabled(bool enabled) OVERRIDE; |
| 55 |
| 53 private: | 56 private: |
| 54 friend class base::RefCountedThreadSafe<BrowserAccessibilityStateImpl>; | 57 friend class base::RefCountedThreadSafe<BrowserAccessibilityStateImpl>; |
| 55 friend struct DefaultSingletonTraits<BrowserAccessibilityStateImpl>; | 58 friend struct DefaultSingletonTraits<BrowserAccessibilityStateImpl>; |
| 56 | 59 |
| 57 // Called a short while after startup to allow time for the accessibility | 60 // Called a short while after startup to allow time for the accessibility |
| 58 // state to be determined. Updates histograms with the current state. | 61 // state to be determined. Updates histograms with the current state. |
| 59 void UpdateHistograms(); | 62 void UpdateHistograms(); |
| 60 | 63 |
| 61 // Leaky singleton, destructor generally won't be called. | 64 // Leaky singleton, destructor generally won't be called. |
| 62 virtual ~BrowserAccessibilityStateImpl(); | 65 virtual ~BrowserAccessibilityStateImpl(); |
| 63 | 66 |
| 64 void UpdatePlatformSpecificHistograms(); | 67 void UpdatePlatformSpecificHistograms(); |
| 65 | 68 |
| 66 AccessibilityMode accessibility_mode_; | 69 AccessibilityMode accessibility_mode_; |
| 67 | 70 |
| 68 std::vector<base::Closure> histogram_callbacks_; | 71 std::vector<base::Closure> histogram_callbacks_; |
| 69 | 72 |
| 70 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityStateImpl); | 73 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityStateImpl); |
| 71 }; | 74 }; |
| 72 | 75 |
| 73 } // namespace content | 76 } // namespace content |
| 74 | 77 |
| 75 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_IMPL_H_ | 78 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_IMPL_H_ |
| OLD | NEW |