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

Side by Side Diff: chrome/browser/resources/access_chromevox/chromevox/injected/main.js

Issue 6254007: Adding ChromeVox as a component extensions (enabled only for ChromeOS, for no... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
Property Changes:
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview The main entry point for the extension content script.
7 *
8 * This is the only file that has access to the chrome.extension API
9 * from the content script, because all other scripts are loaded into the
10 * document head. So, any use of these extension APIs must be done in this
11 * file.
12 */
13
14 // TODO(dmazzoni): pull in these dependencies without explicitly
15 // calling the private method writeScriptTag_.
16 function initialize() {
17 if (COMPILED) {
18 var loadCompiledScript = function(scriptRelPath) {
19 var scriptElt = document.createElement('script');
20 scriptElt.type = 'text/javascript';
21 scriptElt.src = chrome.extension.getURL(scriptRelPath);
22 document.getElementsByTagName('head')[0].appendChild(scriptElt);
23 };
24 if (BUILD_TYPE == BUILD_TYPE_CHROME) {
25 loadCompiledScript('/chromeVoxChromePageScript.js');
26 } else if (BUILD_TYPE == BUILD_TYPE_ANDROID_DEV) {
27 loadCompiledScript('/androidVoxDev.js');
28 } else {
29 throw 'Unknown or unsupported build type: ' + BUILD_TYPE;
30 }
31 } else {
32 goog.writeScriptTag_(chrome.extension.getURL('/closure/base.js'));
33 goog.writeScriptTag_(chrome.extension.getURL('../powerkey-bundle.js'));
34 goog.require('cvox.ChromeVoxInit');
35 }
36 }
37
38 initialize();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698