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

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

Issue 608853006: Reland fix ChromeVox Next compile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Begin and end comments for auto generated content. Created 6 years, 2 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..2dccbe56bcffe8212ae119632275c570d5afc646 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -21,28 +21,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 +76,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,7 +91,7 @@ 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.
@@ -142,7 +145,7 @@ cvox2.Background.prototype = {
pred = cvox2.AutomationPredicates.link;
break;
case 'nextElement':
- current = current.role == chrome.automation.RoleType.inlineTextBox ?
+ current = current.role == 'inlineTextBox' ?
Peter Lundblad 2014/10/03 12:03:53 nit: keep using the exposed enum value.
current.parent() : current;
current = cvox2.AutomationUtil.findNextNode(current,
cvox2.Dir.FORWARD,
@@ -150,7 +153,7 @@ cvox2.Background.prototype = {
current = current ? current.parent() : current;
break;
case 'previousElement':
- current = current.role == chrome.automation.RoleType.inlineTextBox ?
+ current = current.role == 'inlineTextBox' ?
Peter Lundblad 2014/10/03 12:03:53 nit: use the exposed enum.
current.parent() : current;
current = cvox2.AutomationUtil.findNextNode(current,
cvox2.Dir.BACKWARD,

Powered by Google App Engine
This is Rietveld 408576698