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

Side by Side Diff: chrome/browser/chromeos/accessibility/accessibility_util.cc

Issue 11299312: Run Chrome OS accessibility histograms on main thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed feedback Created 8 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
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_state_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_state_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698