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 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 5 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 | 8 |
9 #include "ash/high_contrast/high_contrast_controller.h" | 9 #include "ash/high_contrast/high_contrast_controller.h" |
10 #include "ash/magnifier/magnification_controller.h" | 10 #include "ash/magnifier/magnification_controller.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 std::queue<ExtensionResource> resources_; | 114 std::queue<ExtensionResource> resources_; |
115 }; | 115 }; |
116 | 116 |
117 void UpdateChromeOSAccessibilityHistograms() { | 117 void UpdateChromeOSAccessibilityHistograms() { |
118 UMA_HISTOGRAM_BOOLEAN("Accessibility.CrosSpokenFeedback", | 118 UMA_HISTOGRAM_BOOLEAN("Accessibility.CrosSpokenFeedback", |
119 IsSpokenFeedbackEnabled()); | 119 IsSpokenFeedbackEnabled()); |
120 UMA_HISTOGRAM_BOOLEAN("Accessibility.CrosHighContrast", | 120 UMA_HISTOGRAM_BOOLEAN("Accessibility.CrosHighContrast", |
121 IsHighContrastEnabled()); | 121 IsHighContrastEnabled()); |
122 UMA_HISTOGRAM_BOOLEAN("Accessibility.CrosVirtualKeyboard", | 122 UMA_HISTOGRAM_BOOLEAN("Accessibility.CrosVirtualKeyboard", |
123 IsVirtualKeyboardEnabled()); | 123 IsVirtualKeyboardEnabled()); |
| 124 UMA_HISTOGRAM_ENUMERATION("Accessibility.CrosScreenMagnifier", |
| 125 GetMagnifierType(), |
| 126 3); |
124 } | 127 } |
125 | 128 |
126 void Initialize() { | 129 void Initialize() { |
127 content::BrowserAccessibilityState::GetInstance()->AddHistogramCallback( | 130 content::BrowserAccessibilityState::GetInstance()->AddHistogramCallback( |
128 base::Bind(&UpdateChromeOSAccessibilityHistograms)); | 131 base::Bind(&UpdateChromeOSAccessibilityHistograms)); |
129 } | 132 } |
130 | 133 |
131 void EnableSpokenFeedback(bool enabled, content::WebUI* login_web_ui) { | 134 void EnableSpokenFeedback(bool enabled, content::WebUI* login_web_ui) { |
132 bool spoken_feedback_enabled = g_browser_process && | 135 bool spoken_feedback_enabled = g_browser_process && |
133 g_browser_process->local_state()->GetBoolean( | 136 g_browser_process->local_state()->GetBoolean( |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 if (IsSpokenFeedbackEnabled()) | 308 if (IsSpokenFeedbackEnabled()) |
306 Speak(utterance); | 309 Speak(utterance); |
307 } | 310 } |
308 | 311 |
309 void ShowAccessibilityHelp(Browser* browser) { | 312 void ShowAccessibilityHelp(Browser* browser) { |
310 chrome::ShowSingletonTab(browser, GURL(chrome::kChromeAccessibilityHelpURL)); | 313 chrome::ShowSingletonTab(browser, GURL(chrome::kChromeAccessibilityHelpURL)); |
311 } | 314 } |
312 | 315 |
313 } // namespace accessibility | 316 } // namespace accessibility |
314 } // namespace chromeos | 317 } // namespace chromeos |
OLD | NEW |