| 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 "content/browser/accessibility/browser_accessibility_state_impl.h" | 5 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
| 6 | 6 |
| 7 #include <psapi.h> | 7 #include <psapi.h> |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| 11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 void BrowserAccessibilityStateImpl::UpdatePlatformSpecificHistograms() { | 16 void BrowserAccessibilityStateImpl::UpdatePlatformSpecificHistograms() { |
| 17 // NOTE: this method is run from the file thread to reduce jank, since |
| 18 // there's no guarantee these system calls will return quickly. Be careful |
| 19 // not to add any code that isn't safe to run from a non-main thread! |
| 20 |
| 17 AUDIODESCRIPTION audio_description = {0}; | 21 AUDIODESCRIPTION audio_description = {0}; |
| 18 audio_description.cbSize = sizeof(AUDIODESCRIPTION); | 22 audio_description.cbSize = sizeof(AUDIODESCRIPTION); |
| 19 SystemParametersInfo(SPI_GETAUDIODESCRIPTION, 0, &audio_description, 0); | 23 SystemParametersInfo(SPI_GETAUDIODESCRIPTION, 0, &audio_description, 0); |
| 20 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinAudioDescription", | 24 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinAudioDescription", |
| 21 !!audio_description.Enabled); | 25 !!audio_description.Enabled); |
| 22 | 26 |
| 23 BOOL win_screen_reader = FALSE; | 27 BOOL win_screen_reader = FALSE; |
| 24 SystemParametersInfo(SPI_GETSCREENREADER, 0, &win_screen_reader, 0); | 28 SystemParametersInfo(SPI_GETSCREENREADER, 0, &win_screen_reader, 0); |
| 25 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinScreenReader", | 29 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinScreenReader", |
| 26 !!win_screen_reader); | 30 !!win_screen_reader); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 zoomtext = true; | 68 zoomtext = true; |
| 65 } | 69 } |
| 66 | 70 |
| 67 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinJAWS", jaws); | 71 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinJAWS", jaws); |
| 68 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinNVDA", nvda); | 72 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinNVDA", nvda); |
| 69 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinSAToGo", satogo); | 73 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinSAToGo", satogo); |
| 70 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinZoomText", zoomtext); | 74 UMA_HISTOGRAM_BOOLEAN("Accessibility.WinZoomText", zoomtext); |
| 71 } | 75 } |
| 72 | 76 |
| 73 } // namespace content | 77 } // namespace content |
| OLD | NEW |