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

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

Issue 880063002: Ensure WebView notifies desktop automation on creation, destruction, and change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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 2776b6f9f258bd456373611be8168bacd825b788..f93f95a3c8c193fa505b302caa0993653ead64df 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
@@ -16,7 +16,6 @@ goog.require('Output');
goog.require('Output.EventType');
goog.require('cursors.Cursor');
goog.require('cvox.ChromeVoxEditableTextBase');
-goog.require('cvox.TabsApiHandler');
// Define types here due to editable_text.js's implicit dependency with
// ChromeVoxEventWatcher.
@@ -46,14 +45,6 @@ Background = function() {
this.whitelist_ = ['chromevox_next_test'];
/**
- * @type {cvox.TabsApiHandler}
- * @private
- */
- this.tabsHandler_ = new cvox.TabsApiHandler(cvox.ChromeVox.tts,
- cvox.ChromeVox.braille,
- cvox.ChromeVox.earcons);
-
- /**
* @type {cursors.Range}
* @private
*/
@@ -371,21 +362,11 @@ Background.prototype = {
if (opt_options.next) {
if (!chrome.commands.onCommand.hasListener(this.onGotCommand))
- chrome.commands.onCommand.addListener(this.onGotCommand);
-
- if (!this.active_)
- chrome.automation.getTree(this.onGotTree);
- this.active_ = true;
+ chrome.commands.onCommand.addListener(this.onGotCommand);
+ this.active_ = true;
} else {
if (chrome.commands.onCommand.hasListener(this.onGotCommand))
chrome.commands.onCommand.removeListener(this.onGotCommand);
-
- if (this.active_) {
- for (var eventType in this.listeners_) {
- this.currentRange_.getStart().getNode().root.removeEventListener(
- eventType, this.listeners_[eventType], true);
- }
- }
this.active_ = false;
}

Powered by Google App Engine
This is Rietveld 408576698