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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js

Issue 613223003: Fix ChromeVox Next compile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Reland cl. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
index e39f303280fce88a6ef6e1c43c99bf90cece6ee4..4bc00e58e20f5e146800a6ae25f573497987164d 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -5,6 +5,7 @@
/**
* @fileoverview The entry point for all ChromeVox2 related code for the
* background page.
+ *
*/
goog.provide('cvox2.Background');
@@ -21,28 +22,31 @@ cvox2.global.accessibility =
/**
* ChromeVox2 background page.
+ * @constructor
*/
cvox2.Background = function() {
/**
* A list of site substring patterns to use with ChromeVox next. Keep these
* strings relatively specific.
* @type {!Array.<string>}
+ * @private
*/
this.whitelist_ = ['http://www.chromevox.com/', 'chromevox_next_test'];
- /** @type {cvox.TabsApiHandler} @private */
+ /**
+ * @type {cvox.TabsApiHandler}
+ * @private
+ */
this.tabsHandler_ = new cvox.TabsApiHandler(cvox.ChromeVox.tts,
cvox.ChromeVox.braille,
cvox.ChromeVox.earcons);
- /** @type {AutomationNode} @private */
+ /**
+ * @type {chrome.automation.AutomationNode}
+ * @private
+ */
this.currentNode_ = null;
- /** @type {cvox.TabsApiHandler} @private */
- this.tabsHandler_ = new cvox.TabsApiHandler(cvox.ChromeVox.tts,
- cvox.ChromeVox.braille,
- cvox.ChromeVox.earcons);
-
// Only needed with unmerged ChromeVox classic loaded before.
cvox2.global.accessibility.setAccessibilityEnabled(false);
@@ -73,7 +77,7 @@ cvox2.Background.prototype = {
if (!this.isWhitelisted_(tab.url)) {
chrome.commands.onCommand.removeListener(this.onGotCommand);
- cvox.ChromeVox.background.injectChromeVoxIntoTabs([tab], true);
+ cvox.ChromeVox.injectChromeVoxIntoTabs([tab], true);
return;
}
@@ -88,14 +92,14 @@ cvox2.Background.prototype = {
/**
* Handles all setup once a new automation tree appears.
- * @param {AutomationTree} tree The new automation tree.
+ * @param {chrome.automation.AutomationNode} root
*/
onGotTree: function(root) {
// Register all automation event listeners.
- root.addEventListener(chrome.automation.EventType.focus,
+ root.addEventListener('focus',
this.onFocus,
true);
- root.addEventListener(chrome.automation.EventType.loadComplete,
+ root.addEventListener('loadComplete',
this.onLoadComplete,
true);
@@ -142,7 +146,7 @@ cvox2.Background.prototype = {
pred = cvox2.AutomationPredicates.link;
break;
case 'nextElement':
- current = current.role == chrome.automation.RoleType.inlineTextBox ?
+ current = current.role == 'inlineTextBox' ?
current.parent() : current;
current = cvox2.AutomationUtil.findNextNode(current,
cvox2.Dir.FORWARD,
@@ -150,7 +154,7 @@ cvox2.Background.prototype = {
current = current ? current.parent() : current;
break;
case 'previousElement':
- current = current.role == chrome.automation.RoleType.inlineTextBox ?
+ current = current.role == 'inlineTextBox' ?
current.parent() : current;
current = cvox2.AutomationUtil.findNextNode(current,
cvox2.Dir.BACKWARD,

Powered by Google App Engine
This is Rietveld 408576698