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

Side by Side Diff: content/browser/accessibility/browser_accessibility_state_impl.h

Issue 12335101: Move some accessibility methods, enums and interfaces into the content/public API. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address review comments Created 7 years, 9 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_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"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
13 #include "content/common/view_message_enums.h"
14 #include "content/public/browser/browser_accessibility_state.h" 13 #include "content/public/browser/browser_accessibility_state.h"
14 #include "content/public/common/accessibility_mode.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 // The BrowserAccessibilityState class is used to determine if Chrome should be 18 // The BrowserAccessibilityState class is used to determine if Chrome should be
19 // customized for users with assistive technology, such as screen readers. We 19 // customized for users with assistive technology, such as screen readers. We
20 // modify the behavior of certain user interfaces to provide a better experience 20 // modify the behavior of certain user interfaces to provide a better experience
21 // for screen reader users. The way we detect a screen reader program is 21 // for screen reader users. The way we detect a screen reader program is
22 // different for each platform. 22 // different for each platform.
23 // 23 //
24 // Screen Reader Detection 24 // Screen Reader Detection
(...skipping 15 matching lines...) Expand all
40 40
41 static BrowserAccessibilityStateImpl* GetInstance(); 41 static BrowserAccessibilityStateImpl* GetInstance();
42 42
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 virtual AccessibilityMode GetAccessibilityMode() OVERRIDE;
51 void SetAccessibilityMode(AccessibilityMode mode); 51 virtual void SetAccessibilityMode(AccessibilityMode mode) OVERRIDE;
52 52
53 private: 53 private:
54 friend class base::RefCountedThreadSafe<BrowserAccessibilityStateImpl>; 54 friend class base::RefCountedThreadSafe<BrowserAccessibilityStateImpl>;
55 friend struct DefaultSingletonTraits<BrowserAccessibilityStateImpl>; 55 friend struct DefaultSingletonTraits<BrowserAccessibilityStateImpl>;
56 56
57 // Called a short while after startup to allow time for the accessibility 57 // Called a short while after startup to allow time for the accessibility
58 // state to be determined. Updates histograms with the current state. 58 // state to be determined. Updates histograms with the current state.
59 void UpdateHistograms(); 59 void UpdateHistograms();
60 60
61 // Leaky singleton, destructor generally won't be called. 61 // Leaky singleton, destructor generally won't be called.
62 virtual ~BrowserAccessibilityStateImpl(); 62 virtual ~BrowserAccessibilityStateImpl();
63 63
64 void UpdatePlatformSpecificHistograms(); 64 void UpdatePlatformSpecificHistograms();
65 65
66 AccessibilityMode accessibility_mode_; 66 AccessibilityMode accessibility_mode_;
67 67
68 std::vector<base::Closure> histogram_callbacks_; 68 std::vector<base::Closure> histogram_callbacks_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityStateImpl); 70 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityStateImpl);
71 }; 71 };
72 72
73 } // namespace content 73 } // namespace content
74 74
75 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_IMPL_H_ 75 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698