| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_manager.h" | 5 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <utility> | 11 #include <utility> |
| 12 | 12 |
| 13 #include "ash/ash_constants.h" | 13 #include "ash/ash_constants.h" |
| 14 #include "ash/ash_switches.h" | |
| 15 #include "ash/autoclick/autoclick_controller.h" | 14 #include "ash/autoclick/autoclick_controller.h" |
| 16 #include "ash/autoclick/mus/public/interfaces/autoclick.mojom.h" | 15 #include "ash/autoclick/mus/public/interfaces/autoclick.mojom.h" |
| 17 #include "ash/high_contrast/high_contrast_controller.h" | 16 #include "ash/high_contrast/high_contrast_controller.h" |
| 18 #include "ash/root_window_controller.h" | 17 #include "ash/root_window_controller.h" |
| 19 #include "ash/shelf/shelf_layout_manager.h" | 18 #include "ash/shelf/shelf_layout_manager.h" |
| 20 #include "ash/shelf/wm_shelf.h" | 19 #include "ash/shelf/wm_shelf.h" |
| 21 #include "ash/shell.h" | 20 #include "ash/shell.h" |
| 22 #include "ash/shell_port.h" | 21 #include "ash/shell_port.h" |
| 23 #include "ash/sticky_keys/sticky_keys_controller.h" | 22 #include "ash/sticky_keys/sticky_keys_controller.h" |
| 24 #include "ash/wm_window.h" | 23 #include "ash/wm_window.h" |
| (...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 UMA_HISTOGRAM_ENUMERATION("Accessibility.CrosScreenMagnifier", type, | 1325 UMA_HISTOGRAM_ENUMERATION("Accessibility.CrosScreenMagnifier", type, |
| 1327 ash::kMaxMagnifierType + 1); | 1326 ash::kMaxMagnifierType + 1); |
| 1328 } | 1327 } |
| 1329 if (profile_) { | 1328 if (profile_) { |
| 1330 const PrefService* const prefs = profile_->GetPrefs(); | 1329 const PrefService* const prefs = profile_->GetPrefs(); |
| 1331 | 1330 |
| 1332 bool large_cursor_enabled = | 1331 bool large_cursor_enabled = |
| 1333 prefs->GetBoolean(prefs::kAccessibilityLargeCursorEnabled); | 1332 prefs->GetBoolean(prefs::kAccessibilityLargeCursorEnabled); |
| 1334 UMA_HISTOGRAM_BOOLEAN("Accessibility.CrosLargeCursor", | 1333 UMA_HISTOGRAM_BOOLEAN("Accessibility.CrosLargeCursor", |
| 1335 large_cursor_enabled); | 1334 large_cursor_enabled); |
| 1336 if (large_cursor_enabled && | 1335 if (large_cursor_enabled) { |
| 1337 base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 1338 ash::switches::kAshAdjustableLargeCursor)) { | |
| 1339 UMA_HISTOGRAM_COUNTS_100( | 1336 UMA_HISTOGRAM_COUNTS_100( |
| 1340 "Accessibility.CrosLargeCursorSize", | 1337 "Accessibility.CrosLargeCursorSize", |
| 1341 prefs->GetInteger(prefs::kAccessibilityLargeCursorDipSize)); | 1338 prefs->GetInteger(prefs::kAccessibilityLargeCursorDipSize)); |
| 1342 } | 1339 } |
| 1343 | 1340 |
| 1344 UMA_HISTOGRAM_BOOLEAN( | 1341 UMA_HISTOGRAM_BOOLEAN( |
| 1345 "Accessibility.CrosAlwaysShowA11yMenu", | 1342 "Accessibility.CrosAlwaysShowA11yMenu", |
| 1346 prefs->GetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu)); | 1343 prefs->GetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu)); |
| 1347 | 1344 |
| 1348 bool autoclick_enabled = | 1345 bool autoclick_enabled = |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 content::BrowserContext* context) { | 1530 content::BrowserContext* context) { |
| 1534 keyboard_listener_extension_id_ = id; | 1531 keyboard_listener_extension_id_ = id; |
| 1535 | 1532 |
| 1536 extensions::ExtensionRegistry* registry = | 1533 extensions::ExtensionRegistry* registry = |
| 1537 extensions::ExtensionRegistry::Get(context); | 1534 extensions::ExtensionRegistry::Get(context); |
| 1538 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) | 1535 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) |
| 1539 extension_registry_observer_.Add(registry); | 1536 extension_registry_observer_.Add(registry); |
| 1540 } | 1537 } |
| 1541 | 1538 |
| 1542 } // namespace chromeos | 1539 } // namespace chromeos |
| OLD | NEW |