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

Side by Side Diff: chrome/browser/resources/access_chromevox/scripts/booksReader.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 goog.provide('cvox.ChromeVoxBooksReader');
6
7 goog.require('cvox.BooksReaderApi');
8 goog.require('cvox.ChromeVox');
9
10 /**
11 * @fileoverview Script for enhancing the Google Books Reader.
12 */
13 cvox.ChromeVoxBooksReader = { };
14
15 /**
16 * Listener for responding to Books events.
17 * @type {Object}
18 */
19 cvox.ChromeVoxBooksReader.listener = null;
20
21 /**
22 * Initializes the Psychic Search script.
23 */
24 cvox.ChromeVoxBooksReader.init = function() {
25 cvox.ChromeVoxBooksReader.listener = new BooksListener();
26
27 cvox.ChromeVoxBooksReader.listener.onPageTurned = function(pageObject) {
28 var pageContentNode = pageObject.getNode();
29 cvox.ChromeVox.tts.speak(pageContentNode.textContent, 0, null);
30 cvox.ChromeVox.navigationManager.syncToNode(
31 pageContentNode.previousSibling);
32 };
33
34 cvox.ChromeVoxBooksReader.listener.onIndexItemSelected =
35 function(indexItemObject) {
36 cvox.ChromeVox.tts.speak(indexItemObject.getText() + ' ' +
37 indexItemObject.getPageNumber(), 0, null);
38 };
39
40 BooksReaderApi.setBooksEventListener(cvox.ChromeVoxBooksReader.listener);
41 };
42
43 window.setTimeout(cvox.ChromeVoxBooksReader.init, 500);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698