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

Side by Side Diff: chrome/browser/accessibility/browser_accessibility_state.h

Issue 5711001: Add a new GetInstance() method for remaining files with singleton classes under chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_H_ 5 #ifndef CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_H_
6 #define CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_H_ 6 #define CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/singleton.h" 10 #include "base/singleton.h"
joth 2010/12/09 15:06:40 remove, fwd declare traits
11 11
12 // The BrowserAccessibilityState class is used to determine if Chrome should be 12 // The BrowserAccessibilityState class is used to determine if Chrome should be
13 // customized for users with assistive technology, such as screen readers. We 13 // customized for users with assistive technology, such as screen readers. We
14 // modify the behavior of certain user interfaces to provide a better experience 14 // modify the behavior of certain user interfaces to provide a better experience
15 // for screen reader users. The way we detect a screen reader program is 15 // for screen reader users. The way we detect a screen reader program is
16 // different for each platform. 16 // different for each platform.
17 // 17 //
18 // Screen Reader Detection 18 // Screen Reader Detection
19 // (1) On windows many screen reader detection mechinisms will give false 19 // (1) On windows many screen reader detection mechinisms will give false
20 // positives like relying on the SPI_GETSCREENREADER system parameter. In Chrome 20 // positives like relying on the SPI_GETSCREENREADER system parameter. In Chrome
21 // we attempt to dynamically detect a MSAA client screen reader by calling 21 // we attempt to dynamically detect a MSAA client screen reader by calling
22 // NotifiyWinEvent in WidgetWin with a custom ID and wait to see if the ID 22 // NotifiyWinEvent in WidgetWin with a custom ID and wait to see if the ID
23 // is requested by a subsequent call to WM_GETOBJECT. 23 // is requested by a subsequent call to WM_GETOBJECT.
24 // (2) On mac we detect if VoiceOver is running. This is stored in a preference 24 // (2) On mac we detect if VoiceOver is running. This is stored in a preference
25 // file for Universal Access with the key "voiceOverOnOffKey". 25 // file for Universal Access with the key "voiceOverOnOffKey".
26 class BrowserAccessibilityState { 26 class BrowserAccessibilityState {
27 public: 27 public:
28 // Returns the singleton instance.
29 static BrowserAccessibilityState* GetInstance();
30
28 ~BrowserAccessibilityState(); 31 ~BrowserAccessibilityState();
29 32
30 // Called when screen reader client is detected. 33 // Called when screen reader client is detected.
31 void OnScreenReaderDetected(); 34 void OnScreenReaderDetected();
32 35
33 // Returns true if the Chrome browser should be customized for accessibility. 36 // Returns true if the Chrome browser should be customized for accessibility.
34 bool IsAccessibleBrowser(); 37 bool IsAccessibleBrowser();
35 38
36 private: 39 private:
37 BrowserAccessibilityState(); 40 BrowserAccessibilityState();
38 friend struct DefaultSingletonTraits<BrowserAccessibilityState>; 41 friend struct DefaultSingletonTraits<BrowserAccessibilityState>;
39 42
40 // Set to true when a screen reader client is detected. 43 // Set to true when a screen reader client is detected.
41 bool screen_reader_active_; 44 bool screen_reader_active_;
42 45
43 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityState); 46 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityState);
44 }; 47 };
45 48
46 #endif // CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_H_ 49 #endif // CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_STATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/accessibility/browser_accessibility_state.cc » ('j') | chrome/browser/chromeos/audio_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698