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

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

Issue 2577713002: Enable default media session when ChromeVox is toggled. (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 base::CommandLine::ForCurrentProcess()->AppendSwitch(
dmazzoni 2016/12/15 18:27:42 Add a guard to do this only if the flag isn't alre
1316 switches::kEnableDefaultMediaSession);
1313 } 1317 }
1314 1318
1315 void AccessibilityManager::PostUnloadChromeVox() { 1319 void AccessibilityManager::PostUnloadChromeVox() {
1316 // Do any teardown work needed immediately after ChromeVox actually unloads. 1320 // Do any teardown work needed immediately after ChromeVox actually unloads.
1317 PlayEarcon(SOUND_SPOKEN_FEEDBACK_DISABLED, PlaySoundOption::ALWAYS); 1321 PlayEarcon(SOUND_SPOKEN_FEEDBACK_DISABLED, PlaySoundOption::ALWAYS);
1318 // Clear the accessibility focus ring. 1322 // Clear the accessibility focus ring.
1319 AccessibilityFocusRingController::GetInstance()->SetFocusRing( 1323 AccessibilityFocusRingController::GetInstance()->SetFocusRing(
1320 std::vector<gfx::Rect>(), 1324 std::vector<gfx::Rect>(),
1321 AccessibilityFocusRingController::PERSIST_FOCUS_RING); 1325 AccessibilityFocusRingController::PERSIST_FOCUS_RING);
1322 1326
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 content::BrowserContext* context) { 1365 content::BrowserContext* context) {
1362 keyboard_listener_extension_id_ = id; 1366 keyboard_listener_extension_id_ = id;
1363 1367
1364 extensions::ExtensionRegistry* registry = 1368 extensions::ExtensionRegistry* registry =
1365 extensions::ExtensionRegistry::Get(context); 1369 extensions::ExtensionRegistry::Get(context);
1366 if (!extension_registry_observer_.IsObserving(registry) && !id.empty()) 1370 if (!extension_registry_observer_.IsObserving(registry) && !id.empty())
1367 extension_registry_observer_.Add(registry); 1371 extension_registry_observer_.Add(registry);
1368 } 1372 }
1369 1373
1370 } // namespace chromeos 1374 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698