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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 #include "content/public/common/service_manager_connection.h" | 69 #include "content/public/common/service_manager_connection.h" |
70 #include "extensions/browser/event_router.h" | 70 #include "extensions/browser/event_router.h" |
71 #include "extensions/browser/extension_registry.h" | 71 #include "extensions/browser/extension_registry.h" |
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 "media/base/media_switches.h" |
79 #include "services/service_manager/public/cpp/connector.h" | 80 #include "services/service_manager/public/cpp/connector.h" |
80 #include "ui/base/ime/chromeos/input_method_manager.h" | 81 #include "ui/base/ime/chromeos/input_method_manager.h" |
81 #include "ui/base/resource/resource_bundle.h" | 82 #include "ui/base/resource/resource_bundle.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; |
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 } | 1304 } |
1304 | 1305 |
1305 should_speak_chrome_vox_announcements_on_user_screen_ = | 1306 should_speak_chrome_vox_announcements_on_user_screen_ = |
1306 chromevox_loader_->loaded_on_lock_screen(); | 1307 chromevox_loader_->loaded_on_lock_screen(); |
1307 | 1308 |
1308 if (!chromevox_panel_) { | 1309 if (!chromevox_panel_) { |
1309 chromevox_panel_ = new ChromeVoxPanel(profile_); | 1310 chromevox_panel_ = new ChromeVoxPanel(profile_); |
1310 chromevox_panel_widget_observer_.reset( | 1311 chromevox_panel_widget_observer_.reset( |
1311 new ChromeVoxPanelWidgetObserver(chromevox_panel_->GetWidget(), this)); | 1312 new ChromeVoxPanelWidgetObserver(chromevox_panel_->GetWidget(), this)); |
1312 } | 1313 } |
| 1314 |
| 1315 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1316 switches::kEnableDefaultMediaSession)) { |
| 1317 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 1318 switches::kEnableDefaultMediaSession); |
| 1319 } |
1313 } | 1320 } |
1314 | 1321 |
1315 void AccessibilityManager::PostUnloadChromeVox() { | 1322 void AccessibilityManager::PostUnloadChromeVox() { |
1316 // Do any teardown work needed immediately after ChromeVox actually unloads. | 1323 // Do any teardown work needed immediately after ChromeVox actually unloads. |
1317 PlayEarcon(SOUND_SPOKEN_FEEDBACK_DISABLED, PlaySoundOption::ALWAYS); | 1324 PlayEarcon(SOUND_SPOKEN_FEEDBACK_DISABLED, PlaySoundOption::ALWAYS); |
1318 // Clear the accessibility focus ring. | 1325 // Clear the accessibility focus ring. |
1319 AccessibilityFocusRingController::GetInstance()->SetFocusRing( | 1326 AccessibilityFocusRingController::GetInstance()->SetFocusRing( |
1320 std::vector<gfx::Rect>(), | 1327 std::vector<gfx::Rect>(), |
1321 AccessibilityFocusRingController::PERSIST_FOCUS_RING); | 1328 AccessibilityFocusRingController::PERSIST_FOCUS_RING); |
1322 | 1329 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 content::BrowserContext* context) { | 1368 content::BrowserContext* context) { |
1362 keyboard_listener_extension_id_ = id; | 1369 keyboard_listener_extension_id_ = id; |
1363 | 1370 |
1364 extensions::ExtensionRegistry* registry = | 1371 extensions::ExtensionRegistry* registry = |
1365 extensions::ExtensionRegistry::Get(context); | 1372 extensions::ExtensionRegistry::Get(context); |
1366 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) | 1373 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) |
1367 extension_registry_observer_.Add(registry); | 1374 extension_registry_observer_.Add(registry); |
1368 } | 1375 } |
1369 | 1376 |
1370 } // namespace chromeos | 1377 } // namespace chromeos |
OLD | NEW |