Chromium Code Reviews| 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> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 #include "extensions/common/extension.h" | 75 #include "extensions/common/extension.h" |
| 76 #include "extensions/common/extension_messages.h" | 76 #include "extensions/common/extension_messages.h" |
| 77 #include "extensions/common/extension_resource.h" | 77 #include "extensions/common/extension_resource.h" |
| 78 #include "extensions/common/host_id.h" | 78 #include "extensions/common/host_id.h" |
| 79 #include "mash/public/interfaces/launchable.mojom.h" | 79 #include "mash/public/interfaces/launchable.mojom.h" |
| 80 #include "media/audio/sounds/sounds_manager.h" | 80 #include "media/audio/sounds/sounds_manager.h" |
| 81 #include "media/base/media_switches.h" | 81 #include "media/base/media_switches.h" |
| 82 #include "services/service_manager/public/cpp/connector.h" | 82 #include "services/service_manager/public/cpp/connector.h" |
| 83 #include "ui/base/ime/chromeos/input_method_manager.h" | 83 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 84 #include "ui/base/resource/resource_bundle.h" | 84 #include "ui/base/resource/resource_bundle.h" |
| 85 #include "ui/gfx/geometry/rect.h" | |
|
Luis Héctor Chávez
2017/01/19 17:17:56
nit: not needed. This file only deals with referen
yawano
2017/01/20 06:52:30
Done.
| |
| 85 #include "ui/keyboard/keyboard_controller.h" | 86 #include "ui/keyboard/keyboard_controller.h" |
| 86 #include "ui/keyboard/keyboard_util.h" | 87 #include "ui/keyboard/keyboard_util.h" |
| 87 | 88 |
| 88 using content::BrowserThread; | 89 using content::BrowserThread; |
| 89 using extensions::api::braille_display_private::BrailleController; | 90 using extensions::api::braille_display_private::BrailleController; |
| 90 using extensions::api::braille_display_private::DisplayState; | 91 using extensions::api::braille_display_private::DisplayState; |
| 91 using extensions::api::braille_display_private::KeyEvent; | 92 using extensions::api::braille_display_private::KeyEvent; |
| 92 using extensions::api::braille_display_private::StubBrailleController; | 93 using extensions::api::braille_display_private::StubBrailleController; |
| 93 | 94 |
| 94 namespace chromeos { | 95 namespace chromeos { |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 537 if (!IsSpokenFeedbackEnabled()) | 538 if (!IsSpokenFeedbackEnabled()) |
| 538 return; | 539 return; |
| 539 | 540 |
| 540 // If the system locale changes and spoken feedback is enabled, | 541 // If the system locale changes and spoken feedback is enabled, |
| 541 // reload ChromeVox so that it switches its internal translations | 542 // reload ChromeVox so that it switches its internal translations |
| 542 // to the new language. | 543 // to the new language. |
| 543 EnableSpokenFeedback(false, ash::A11Y_NOTIFICATION_NONE); | 544 EnableSpokenFeedback(false, ash::A11Y_NOTIFICATION_NONE); |
| 544 EnableSpokenFeedback(true, ash::A11Y_NOTIFICATION_NONE); | 545 EnableSpokenFeedback(true, ash::A11Y_NOTIFICATION_NONE); |
| 545 } | 546 } |
| 546 | 547 |
| 548 void AccessibilityManager::OnViewFocusedInArc(const gfx::Rect& bounds) { | |
| 549 accessibility_highlight_manager_->OnViewFocusedInArc(bounds); | |
| 550 } | |
| 551 | |
| 547 bool AccessibilityManager::PlayEarcon(int sound_key, PlaySoundOption option) { | 552 bool AccessibilityManager::PlayEarcon(int sound_key, PlaySoundOption option) { |
| 548 DCHECK(sound_key < chromeos::SOUND_COUNT); | 553 DCHECK(sound_key < chromeos::SOUND_COUNT); |
| 549 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); | 554 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); |
| 550 if (cl->HasSwitch(kAshDisableSystemSounds)) | 555 if (cl->HasSwitch(kAshDisableSystemSounds)) |
| 551 return false; | 556 return false; |
| 552 if (option == PlaySoundOption::SPOKEN_FEEDBACK_ENABLED && | 557 if (option == PlaySoundOption::SPOKEN_FEEDBACK_ENABLED && |
| 553 !IsSpokenFeedbackEnabled() && !cl->HasSwitch(kAshEnableSystemSounds)) { | 558 !IsSpokenFeedbackEnabled() && !cl->HasSwitch(kAshEnableSystemSounds)) { |
| 554 return false; | 559 return false; |
| 555 } | 560 } |
| 556 return media::SoundsManager::Get()->Play(sound_key); | 561 return media::SoundsManager::Get()->Play(sound_key); |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1367 content::BrowserContext* context) { | 1372 content::BrowserContext* context) { |
| 1368 keyboard_listener_extension_id_ = id; | 1373 keyboard_listener_extension_id_ = id; |
| 1369 | 1374 |
| 1370 extensions::ExtensionRegistry* registry = | 1375 extensions::ExtensionRegistry* registry = |
| 1371 extensions::ExtensionRegistry::Get(context); | 1376 extensions::ExtensionRegistry::Get(context); |
| 1372 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) | 1377 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) |
| 1373 extension_registry_observer_.Add(registry); | 1378 extension_registry_observer_.Add(registry); |
| 1374 } | 1379 } |
| 1375 | 1380 |
| 1376 } // namespace chromeos | 1381 } // namespace chromeos |
| OLD | NEW |