| 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 if (!IsSpokenFeedbackEnabled()) | 537 if (!IsSpokenFeedbackEnabled()) |
| 538 return; | 538 return; |
| 539 | 539 |
| 540 // If the system locale changes and spoken feedback is enabled, | 540 // If the system locale changes and spoken feedback is enabled, |
| 541 // reload ChromeVox so that it switches its internal translations | 541 // reload ChromeVox so that it switches its internal translations |
| 542 // to the new language. | 542 // to the new language. |
| 543 EnableSpokenFeedback(false, ash::A11Y_NOTIFICATION_NONE); | 543 EnableSpokenFeedback(false, ash::A11Y_NOTIFICATION_NONE); |
| 544 EnableSpokenFeedback(true, ash::A11Y_NOTIFICATION_NONE); | 544 EnableSpokenFeedback(true, ash::A11Y_NOTIFICATION_NONE); |
| 545 } | 545 } |
| 546 | 546 |
| 547 void AccessibilityManager::OnViewFocusedInArc( |
| 548 const gfx::Rect& bounds_in_screen) { |
| 549 accessibility_highlight_manager_->OnViewFocusedInArc(bounds_in_screen); |
| 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 |