Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: chrome/browser/chromeos/accessibility/accessibility_manager.cc

Issue 2559663002: Support focus highlight in Android window (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "extensions/browser/extension_system.h" 72 #include "extensions/browser/extension_system.h"
73 #include "extensions/common/extension.h" 73 #include "extensions/common/extension.h"
74 #include "extensions/common/extension_messages.h" 74 #include "extensions/common/extension_messages.h"
75 #include "extensions/common/extension_resource.h" 75 #include "extensions/common/extension_resource.h"
76 #include "extensions/common/host_id.h" 76 #include "extensions/common/host_id.h"
77 #include "mash/public/interfaces/launchable.mojom.h" 77 #include "mash/public/interfaces/launchable.mojom.h"
78 #include "media/audio/sounds/sounds_manager.h" 78 #include "media/audio/sounds/sounds_manager.h"
79 #include "services/service_manager/public/cpp/connector.h" 79 #include "services/service_manager/public/cpp/connector.h"
80 #include "ui/base/ime/chromeos/input_method_manager.h" 80 #include "ui/base/ime/chromeos/input_method_manager.h"
81 #include "ui/base/resource/resource_bundle.h" 81 #include "ui/base/resource/resource_bundle.h"
82 #include "ui/gfx/geometry/rect.h"
82 #include "ui/keyboard/keyboard_controller.h" 83 #include "ui/keyboard/keyboard_controller.h"
83 #include "ui/keyboard/keyboard_util.h" 84 #include "ui/keyboard/keyboard_util.h"
84 85
85 using content::BrowserThread; 86 using content::BrowserThread;
86 using content::RenderViewHost; 87 using content::RenderViewHost;
87 using extensions::api::braille_display_private::BrailleController; 88 using extensions::api::braille_display_private::BrailleController;
88 using extensions::api::braille_display_private::DisplayState; 89 using extensions::api::braille_display_private::DisplayState;
89 using extensions::api::braille_display_private::KeyEvent; 90 using extensions::api::braille_display_private::KeyEvent;
90 using extensions::api::braille_display_private::StubBrailleController; 91 using extensions::api::braille_display_private::StubBrailleController;
91 92
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 if (!IsSpokenFeedbackEnabled()) 534 if (!IsSpokenFeedbackEnabled())
534 return; 535 return;
535 536
536 // If the system locale changes and spoken feedback is enabled, 537 // If the system locale changes and spoken feedback is enabled,
537 // reload ChromeVox so that it switches its internal translations 538 // reload ChromeVox so that it switches its internal translations
538 // to the new language. 539 // to the new language.
539 EnableSpokenFeedback(false, ash::A11Y_NOTIFICATION_NONE); 540 EnableSpokenFeedback(false, ash::A11Y_NOTIFICATION_NONE);
540 EnableSpokenFeedback(true, ash::A11Y_NOTIFICATION_NONE); 541 EnableSpokenFeedback(true, ash::A11Y_NOTIFICATION_NONE);
541 } 542 }
542 543
544 void AccessibilityManager::OnViewFocusedInArc(const gfx::Rect& bounds) {
545 accessibility_highlight_manager_->OnViewFocusedInArc(bounds);
546 }
547
543 bool AccessibilityManager::PlayEarcon(int sound_key, PlaySoundOption option) { 548 bool AccessibilityManager::PlayEarcon(int sound_key, PlaySoundOption option) {
544 DCHECK(sound_key < chromeos::SOUND_COUNT); 549 DCHECK(sound_key < chromeos::SOUND_COUNT);
545 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); 550 base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
546 if (cl->HasSwitch(kAshDisableSystemSounds)) 551 if (cl->HasSwitch(kAshDisableSystemSounds))
547 return false; 552 return false;
548 if (option == PlaySoundOption::SPOKEN_FEEDBACK_ENABLED && 553 if (option == PlaySoundOption::SPOKEN_FEEDBACK_ENABLED &&
549 !IsSpokenFeedbackEnabled() && !cl->HasSwitch(kAshEnableSystemSounds)) { 554 !IsSpokenFeedbackEnabled() && !cl->HasSwitch(kAshEnableSystemSounds)) {
550 return false; 555 return false;
551 } 556 }
552 return media::SoundsManager::Get()->Play(sound_key); 557 return media::SoundsManager::Get()->Play(sound_key);
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 content::BrowserContext* context) { 1366 content::BrowserContext* context) {
1362 keyboard_listener_extension_id_ = id; 1367 keyboard_listener_extension_id_ = id;
1363 1368
1364 extensions::ExtensionRegistry* registry = 1369 extensions::ExtensionRegistry* registry =
1365 extensions::ExtensionRegistry::Get(context); 1370 extensions::ExtensionRegistry::Get(context);
1366 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1371 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1367 extension_registry_observer_.Add(registry); 1372 extension_registry_observer_.Add(registry);
1368 } 1373 }
1369 1374
1370 } // namespace chromeos 1375 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698