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/autoclick/autoclick_controller.h" | 14 #include "ash/autoclick/autoclick_controller.h" |
15 #include "ash/autoclick/mus/public/interfaces/autoclick.mojom.h" | 15 #include "ash/autoclick/mus/public/interfaces/autoclick.mojom.h" |
16 #include "ash/high_contrast/high_contrast_controller.h" | 16 #include "ash/high_contrast/high_contrast_controller.h" |
17 #include "ash/root_window_controller.h" | 17 #include "ash/root_window_controller.h" |
18 #include "ash/shelf/shelf_layout_manager.h" | 18 #include "ash/shelf/shelf_layout_manager.h" |
19 #include "ash/shelf/wm_shelf.h" | 19 #include "ash/shelf/wm_shelf.h" |
20 #include "ash/shell.h" | 20 #include "ash/shell.h" |
| 21 #include "ash/shell_port.h" |
21 #include "ash/sticky_keys/sticky_keys_controller.h" | 22 #include "ash/sticky_keys/sticky_keys_controller.h" |
22 #include "ash/wm_shell.h" | |
23 #include "ash/wm_window.h" | 23 #include "ash/wm_window.h" |
24 #include "base/callback.h" | 24 #include "base/callback.h" |
25 #include "base/callback_helpers.h" | 25 #include "base/callback_helpers.h" |
26 #include "base/command_line.h" | 26 #include "base/command_line.h" |
27 #include "base/macros.h" | 27 #include "base/macros.h" |
28 #include "base/memory/ptr_util.h" | 28 #include "base/memory/ptr_util.h" |
29 #include "base/memory/singleton.h" | 29 #include "base/memory/singleton.h" |
30 #include "base/metrics/histogram_macros.h" | 30 #include "base/metrics/histogram_macros.h" |
31 #include "base/path_service.h" | 31 #include "base/path_service.h" |
32 #include "base/strings/string_piece.h" | 32 #include "base/strings/string_piece.h" |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 enabled, ash::A11Y_NOTIFICATION_NONE); | 467 enabled, ash::A11Y_NOTIFICATION_NONE); |
468 NotifyAccessibilityStatusChanged(details); | 468 NotifyAccessibilityStatusChanged(details); |
469 ash::Shell::Get()->sticky_keys_controller()->Enable(enabled); | 469 ash::Shell::Get()->sticky_keys_controller()->Enable(enabled); |
470 } | 470 } |
471 | 471 |
472 void AccessibilityManager::EnableSpokenFeedback( | 472 void AccessibilityManager::EnableSpokenFeedback( |
473 bool enabled, | 473 bool enabled, |
474 ash::AccessibilityNotificationVisibility notify) { | 474 ash::AccessibilityNotificationVisibility notify) { |
475 if (!profile_) | 475 if (!profile_) |
476 return; | 476 return; |
477 ash::WmShell::Get()->RecordUserMetricsAction( | 477 ash::ShellPort::Get()->RecordUserMetricsAction( |
478 enabled ? ash::UMA_STATUS_AREA_ENABLE_SPOKEN_FEEDBACK | 478 enabled ? ash::UMA_STATUS_AREA_ENABLE_SPOKEN_FEEDBACK |
479 : ash::UMA_STATUS_AREA_DISABLE_SPOKEN_FEEDBACK); | 479 : ash::UMA_STATUS_AREA_DISABLE_SPOKEN_FEEDBACK); |
480 | 480 |
481 spoken_feedback_notification_ = notify; | 481 spoken_feedback_notification_ = notify; |
482 | 482 |
483 PrefService* pref_service = profile_->GetPrefs(); | 483 PrefService* pref_service = profile_->GetPrefs(); |
484 pref_service->SetBoolean(prefs::kAccessibilitySpokenFeedbackEnabled, enabled); | 484 pref_service->SetBoolean(prefs::kAccessibilitySpokenFeedbackEnabled, enabled); |
485 pref_service->CommitPendingWrite(); | 485 pref_service->CommitPendingWrite(); |
486 | 486 |
487 spoken_feedback_notification_ = ash::A11Y_NOTIFICATION_NONE; | 487 spoken_feedback_notification_ = ash::A11Y_NOTIFICATION_NONE; |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1496 content::BrowserContext* context) { | 1496 content::BrowserContext* context) { |
1497 keyboard_listener_extension_id_ = id; | 1497 keyboard_listener_extension_id_ = id; |
1498 | 1498 |
1499 extensions::ExtensionRegistry* registry = | 1499 extensions::ExtensionRegistry* registry = |
1500 extensions::ExtensionRegistry::Get(context); | 1500 extensions::ExtensionRegistry::Get(context); |
1501 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) | 1501 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) |
1502 extension_registry_observer_.Add(registry); | 1502 extension_registry_observer_.Add(registry); |
1503 } | 1503 } |
1504 | 1504 |
1505 } // namespace chromeos | 1505 } // namespace chromeos |
OLD | NEW |