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

Side by Side Diff: chrome/browser/resources/access_chromevox/chromevox/background/bookmark_manager.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 var COMPILED_FLAG = false;
6 var TEST_FLAG = false;
7 var BASE_URL = '';
8
9 /**
10 * Loads the bookmark manager.
11 */
12 function loadBookmarkManager() {
13 if (document.location.toString().indexOf(
14 'http://www.corp.google.com/~chaitanyag/speech/flash.html') == 0) {
15 return;
16 }
17
18 // Use a hidden div to send messages from the injected content script
19 // to the extension background page.
20 var port = chrome.extension.connect({name: 'content2Chrome'});
21 var hiddenDiv = document.createElement('div');
22 hiddenDiv.id = 'cvoxPage2ExtensionDiv';
23 hiddenDiv.style.display = 'none';
24 document.body.appendChild(hiddenDiv);
25 document.addEventListener('cvoxPage2ExtensionEvent', function() {
26 var message = JSON.parse(hiddenDiv.innerHTML);
27 port.postMessage(message);
28 });
29
30 // Append this to the end of a remote URL to force it to bypass the cache
31 // and be redownloaded.
32 var forceRedownload = '?' + new Date().getTime();
33
34 function loadScript(src) {
35 var theScript = document.createElement('script');
36 theScript.type = 'text/javascript';
37 if (src.substr(0, 4) == 'http')
38 theScript.src = src + forceRedownload;
39 else if (BASE_URL)
40 theScript.src = BASE_URL + src + forceRedownload;
41 else
42 theScript.src = chrome.extension.getURL(src) + forceRedownload;
43 document.getElementsByTagName('head')[0].appendChild(theScript);
44 }
45
46 loadScript('chromevox/injected/extension_bridge.js');
47 loadScript('browser/chromeVox_ttsBridge.js');
48 loadScript('tts/chromeVox_earcons.js');
49 loadScript('chromevox/background/bookmark_manager_ui.js');
50 }
51
52 loadBookmarkManager();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698