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

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

Issue 9003014: Replace WebUI::tab_contents() with web_contents() and switch all users to use web_contents.h inst... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screen_locker_tester.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_util.h" 5 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/accessibility/accessibility_extension_api.h" 10 #include "chrome/browser/accessibility/accessibility_extension_api.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 profile->GetExtensionService(); 110 profile->GetExtensionService();
111 FilePath path = FilePath(extension_misc::kAccessExtensionPath) 111 FilePath path = FilePath(extension_misc::kAccessExtensionPath)
112 .AppendASCII(extension_misc::kChromeVoxDirectoryName); 112 .AppendASCII(extension_misc::kChromeVoxDirectoryName);
113 if (enabled) { // Load ChromeVox 113 if (enabled) { // Load ChromeVox
114 const Extension* extension = 114 const Extension* extension =
115 extension_service->component_loader()->Add(IDR_CHROMEVOX_MANIFEST, 115 extension_service->component_loader()->Add(IDR_CHROMEVOX_MANIFEST,
116 path); 116 path);
117 117
118 if (login_web_ui) { 118 if (login_web_ui) {
119 RenderViewHost* render_view_host = 119 RenderViewHost* render_view_host =
120 login_web_ui->tab_contents()->GetRenderViewHost(); 120 login_web_ui->web_contents()->GetRenderViewHost();
121 // Set a flag to tell ChromeVox that it's just been enabled, 121 // Set a flag to tell ChromeVox that it's just been enabled,
122 // so that it won't interrupt our speech feedback enabled message. 122 // so that it won't interrupt our speech feedback enabled message.
123 ExtensionMsg_ExecuteCode_Params params; 123 ExtensionMsg_ExecuteCode_Params params;
124 params.request_id = 0; 124 params.request_id = 0;
125 params.extension_id = extension->id(); 125 params.extension_id = extension->id();
126 params.is_javascript = true; 126 params.is_javascript = true;
127 params.code = "window.INJECTED_AFTER_LOAD = true;"; 127 params.code = "window.INJECTED_AFTER_LOAD = true;";
128 params.all_frames = true; 128 params.all_frames = true;
129 params.in_main_world = false; 129 params.in_main_world = false;
130 render_view_host->Send(new ExtensionMsg_ExecuteCode( 130 render_view_host->Send(new ExtensionMsg_ExecuteCode(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return false; 175 return false;
176 } 176 }
177 PrefService* prefs = g_browser_process->local_state(); 177 PrefService* prefs = g_browser_process->local_state();
178 bool accessibility_enabled = prefs && 178 bool accessibility_enabled = prefs &&
179 prefs->GetBoolean(prefs::kSpokenFeedbackEnabled); 179 prefs->GetBoolean(prefs::kSpokenFeedbackEnabled);
180 return accessibility_enabled; 180 return accessibility_enabled;
181 } 181 }
182 182
183 } // namespace accessibility 183 } // namespace accessibility
184 } // namespace chromeos 184 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screen_locker_tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698