Switch global error menu icon to vectorized MD asset
[chromium-blink-merge.git] / content / public / browser / browser_accessibility_state.h
blob6c91e1b7b7699734675ebe734dba84c711e96fea
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_
8 #include "base/callback_forward.h"
10 #include "content/common/content_export.h"
12 namespace content {
14 // The BrowserAccessibilityState class is used to determine if the browser
15 // should be customized for users with assistive technology, such as screen
16 // readers.
17 class CONTENT_EXPORT BrowserAccessibilityState {
18 public:
19 virtual ~BrowserAccessibilityState() { }
21 // Returns the singleton instance.
22 static BrowserAccessibilityState* GetInstance();
24 // Enables accessibility for all running tabs.
25 virtual void EnableAccessibility() = 0;
27 // Disables accessibility for all running tabs. (Only if accessibility is not
28 // required by a command line flag or by a platform requirement.)
29 virtual void DisableAccessibility() = 0;
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;
36 // Called when screen reader client is detected.
37 virtual void OnScreenReaderDetected() = 0;
39 // Returns true if the browser should be customized for accessibility.
40 virtual bool IsAccessibleBrowser() = 0;
42 // Add a callback method that will be called once, a small while after the
43 // browser starts up, when accessibility state histograms are updated.
44 // Use this to register a method to update additional accessibility
45 // histograms.
46 virtual void AddHistogramCallback(base::Closure callback) = 0;
48 virtual void UpdateHistogramsForTesting() = 0;
51 } // namespace content
53 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_ACCESSIBILITY_STATE_H_