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

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

Issue 1173523006: Re-enable WebView ChromeVox manual script injection when accessibility status changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h » ('j') | 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 "ash/audio/sounds.h" 7 #include "ash/audio/sounds.h"
8 #include "ash/autoclick/autoclick_controller.h" 8 #include "ash/autoclick/autoclick_controller.h"
9 #include "ash/high_contrast/high_contrast_controller.h" 9 #include "ash/high_contrast/high_contrast_controller.h"
10 #include "ash/metrics/user_metrics_recorder.h" 10 #include "ash/metrics/user_metrics_recorder.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Uses the ScriptExecutor associated with the given |render_view_host| to 103 // Uses the ScriptExecutor associated with the given |render_view_host| to
104 // execute the given |code|. 104 // execute the given |code|.
105 void ExecuteScriptHelper( 105 void ExecuteScriptHelper(
106 content::RenderViewHost* render_view_host, 106 content::RenderViewHost* render_view_host,
107 const std::string& code, 107 const std::string& code,
108 const std::string& extension_id) { 108 const std::string& extension_id) {
109 content::WebContents* web_contents = 109 content::WebContents* web_contents =
110 content::WebContents::FromRenderViewHost(render_view_host); 110 content::WebContents::FromRenderViewHost(render_view_host);
111 if (!web_contents) 111 if (!web_contents)
112 return; 112 return;
113 if (!extensions::TabHelper::FromWebContents(web_contents))
114 extensions::TabHelper::CreateForWebContents(web_contents);
113 extensions::TabHelper::FromWebContents(web_contents)->script_executor()-> 115 extensions::TabHelper::FromWebContents(web_contents)->script_executor()->
114 ExecuteScript(HostID(HostID::EXTENSIONS, extension_id), 116 ExecuteScript(HostID(HostID::EXTENSIONS, extension_id),
115 extensions::ScriptExecutor::JAVASCRIPT, 117 extensions::ScriptExecutor::JAVASCRIPT,
116 code, 118 code,
117 extensions::ScriptExecutor::ALL_FRAMES, 119 extensions::ScriptExecutor::ALL_FRAMES,
118 extensions::ScriptExecutor::DONT_MATCH_ABOUT_BLANK, 120 extensions::ScriptExecutor::DONT_MATCH_ABOUT_BLANK,
119 extensions::UserScript::DOCUMENT_IDLE, 121 extensions::UserScript::DOCUMENT_IDLE,
120 extensions::ScriptExecutor::ISOLATED_WORLD, 122 extensions::ScriptExecutor::ISOLATED_WORLD,
121 extensions::ScriptExecutor::DEFAULT_PROCESS, 123 extensions::ScriptExecutor::DEFAULT_PROCESS,
122 GURL(), // No webview src. 124 GURL(), // No webview src.
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) { 1122 void AccessibilityManager::PostUnloadChromeVox(Profile* profile) {
1121 // Do any teardown work needed immediately after ChromeVox actually unloads. 1123 // Do any teardown work needed immediately after ChromeVox actually unloads.
1122 if (system_sounds_enabled_) 1124 if (system_sounds_enabled_)
1123 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED); 1125 ash::PlaySystemSoundAlways(SOUND_SPOKEN_FEEDBACK_DISABLED);
1124 // Clear the accessibility focus ring. 1126 // Clear the accessibility focus ring.
1125 AccessibilityFocusRingController::GetInstance()->SetFocusRing( 1127 AccessibilityFocusRingController::GetInstance()->SetFocusRing(
1126 std::vector<gfx::Rect>()); 1128 std::vector<gfx::Rect>());
1127 } 1129 }
1128 1130
1129 } // namespace chromeos 1131 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698