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

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

Issue 2559663002: Support focus highlight in Android window (Closed)
Patch Set: Fix a nit. Created 3 years, 11 months 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "extensions/common/extension.h" 76 #include "extensions/common/extension.h"
77 #include "extensions/common/extension_messages.h" 77 #include "extensions/common/extension_messages.h"
78 #include "extensions/common/extension_resource.h" 78 #include "extensions/common/extension_resource.h"
79 #include "extensions/common/host_id.h" 79 #include "extensions/common/host_id.h"
80 #include "mash/public/interfaces/launchable.mojom.h" 80 #include "mash/public/interfaces/launchable.mojom.h"
81 #include "media/audio/sounds/sounds_manager.h" 81 #include "media/audio/sounds/sounds_manager.h"
82 #include "media/base/media_switches.h" 82 #include "media/base/media_switches.h"
83 #include "services/service_manager/public/cpp/connector.h" 83 #include "services/service_manager/public/cpp/connector.h"
84 #include "ui/base/ime/chromeos/input_method_manager.h" 84 #include "ui/base/ime/chromeos/input_method_manager.h"
85 #include "ui/base/resource/resource_bundle.h" 85 #include "ui/base/resource/resource_bundle.h"
86 #include "ui/gfx/geometry/rect.h"
86 #include "ui/keyboard/keyboard_controller.h" 87 #include "ui/keyboard/keyboard_controller.h"
87 #include "ui/keyboard/keyboard_util.h" 88 #include "ui/keyboard/keyboard_util.h"
88 89
89 using content::BrowserThread; 90 using content::BrowserThread;
90 using content::RenderViewHost; 91 using content::RenderViewHost;
91 using extensions::api::braille_display_private::BrailleController; 92 using extensions::api::braille_display_private::BrailleController;
92 using extensions::api::braille_display_private::DisplayState; 93 using extensions::api::braille_display_private::DisplayState;
93 using extensions::api::braille_display_private::KeyEvent; 94 using extensions::api::braille_display_private::KeyEvent;
94 using extensions::api::braille_display_private::StubBrailleController; 95 using extensions::api::braille_display_private::StubBrailleController;
95 96
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 if (!IsSpokenFeedbackEnabled()) 544 if (!IsSpokenFeedbackEnabled())
544 return; 545 return;
545 546
546 // If the system locale changes and spoken feedback is enabled, 547 // If the system locale changes and spoken feedback is enabled,
547 // reload ChromeVox so that it switches its internal translations 548 // reload ChromeVox so that it switches its internal translations
548 // to the new language. 549 // to the new language.
549 EnableSpokenFeedback(false, ash::A11Y_NOTIFICATION_NONE); 550 EnableSpokenFeedback(false, ash::A11Y_NOTIFICATION_NONE);
550 EnableSpokenFeedback(true, ash::A11Y_NOTIFICATION_NONE); 551 EnableSpokenFeedback(true, ash::A11Y_NOTIFICATION_NONE);
551 } 552 }
552 553
554 void AccessibilityManager::OnViewFocusedInArc(const gfx::Rect& bounds) {
555 accessibility_highlight_manager_->OnViewFocusedInArc(bounds);
556 }
557
553 bool AccessibilityManager::PlayEarcon(int sound_key, PlaySoundOption option) { 558 bool AccessibilityManager::PlayEarcon(int sound_key, PlaySoundOption option) {
554 DCHECK(sound_key < chromeos::SOUND_COUNT); 559 DCHECK(sound_key < chromeos::SOUND_COUNT);
555 base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); 560 base::CommandLine* cl = base::CommandLine::ForCurrentProcess();
556 if (cl->HasSwitch(kAshDisableSystemSounds)) 561 if (cl->HasSwitch(kAshDisableSystemSounds))
557 return false; 562 return false;
558 if (option == PlaySoundOption::SPOKEN_FEEDBACK_ENABLED && 563 if (option == PlaySoundOption::SPOKEN_FEEDBACK_ENABLED &&
559 !IsSpokenFeedbackEnabled() && !cl->HasSwitch(kAshEnableSystemSounds)) { 564 !IsSpokenFeedbackEnabled() && !cl->HasSwitch(kAshEnableSystemSounds)) {
560 return false; 565 return false;
561 } 566 }
562 return media::SoundsManager::Get()->Play(sound_key); 567 return media::SoundsManager::Get()->Play(sound_key);
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 content::BrowserContext* context) { 1406 content::BrowserContext* context) {
1402 keyboard_listener_extension_id_ = id; 1407 keyboard_listener_extension_id_ = id;
1403 1408
1404 extensions::ExtensionRegistry* registry = 1409 extensions::ExtensionRegistry* registry =
1405 extensions::ExtensionRegistry::Get(context); 1410 extensions::ExtensionRegistry::Get(context);
1406 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1411 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1407 extension_registry_observer_.Add(registry); 1412 extension_registry_observer_.Add(registry);
1408 } 1413 }
1409 1414
1410 } // namespace chromeos 1415 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698