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

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: Address nits. 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..7e9cc0b2596fa39b3ef22ecae1ba7149b6f68305 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.
@@ -177,8 +180,9 @@ cvox2.Background.prototype = {
if (!node)
return;
var container = node;
- while (container && (container.role == 'inlineTextBox' ||
- container.role == 'staticText'))
+ while (container &&
+ (container.role == chrome.automation.RoleType.inlineTextBox ||
+ container.role == chrome.automation.RoleType.staticText))
container = container.parent();
var role = container ? container.role : node.role;

Powered by Google App Engine
This is Rietveld 408576698