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

Side by Side Diff: chrome/browser/resources/chromeos/chromevox/chromevox/background/tabs_api_handler.js

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Accesses Chrome's tabs extension API and gives 6 * @fileoverview Accesses Chrome's tabs extension API and gives
7 * feedback for events that happen in the "Chrome of Chrome". 7 * feedback for events that happen in the "Chrome of Chrome".
8 */ 8 */
9 9
10 goog.provide('cvox.TabsApiHandler'); 10 goog.provide('cvox.TabsApiHandler');
(...skipping 14 matching lines...) Expand all
25 * @param {cvox.AbstractEarcons} earcons The earcons object to use for playing 25 * @param {cvox.AbstractEarcons} earcons The earcons object to use for playing
26 * earcons. 26 * earcons.
27 */ 27 */
28 cvox.TabsApiHandler = function(tts, braille, earcons) { 28 cvox.TabsApiHandler = function(tts, braille, earcons) {
29 /** @type {cvox.TtsInterface} @private */ 29 /** @type {cvox.TtsInterface} @private */
30 this.tts_ = tts; 30 this.tts_ = tts;
31 /** @type {cvox.BrailleInterface} @private */ 31 /** @type {cvox.BrailleInterface} @private */
32 this.braille_ = braille; 32 this.braille_ = braille;
33 /** @type {cvox.AbstractEarcons} @private */ 33 /** @type {cvox.AbstractEarcons} @private */
34 this.earcons_ = earcons; 34 this.earcons_ = earcons;
35 /** @type {function(string)} @private */ 35 /** @type {function(string, Array<string>=)} @private */
36 this.msg_ = cvox.ChromeVox.msgs.getMsg.bind(cvox.ChromeVox.msgs); 36 this.msg_ = cvox.ChromeVox.msgs.getMsg.bind(cvox.ChromeVox.msgs);
37 /** 37 /**
38 * Tracks whether the active tab has finished loading. 38 * Tracks whether the active tab has finished loading.
39 * @type {boolean} 39 * @type {boolean}
40 * @private 40 * @private
41 */ 41 */
42 this.lastActiveTabLoaded_ = false; 42 this.lastActiveTabLoaded_ = false;
43 43
44 chrome.tabs.onCreated.addListener(this.onCreated.bind(this)); 44 chrome.tabs.onCreated.addListener(this.onCreated.bind(this));
45 chrome.tabs.onRemoved.addListener(this.onRemoved.bind(this)); 45 chrome.tabs.onRemoved.addListener(this.onRemoved.bind(this));
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 this.tts_.speak(this.msg_(msgId, [title]), 142 this.tts_.speak(this.msg_(msgId, [title]),
143 cvox.QueueMode.FLUSH, 143 cvox.QueueMode.FLUSH,
144 cvox.AbstractTts.PERSONALITY_ANNOUNCEMENT); 144 cvox.AbstractTts.PERSONALITY_ANNOUNCEMENT);
145 this.braille_.write( 145 this.braille_.write(
146 cvox.NavBraille.fromText(this.msg_(msgId, [title]))); 146 cvox.NavBraille.fromText(this.msg_(msgId, [title])));
147 this.earcons_.playEarcon(cvox.AbstractEarcons.OBJECT_SELECT); 147 this.earcons_.playEarcon(cvox.AbstractEarcons.OBJECT_SELECT);
148 }.bind(this)); 148 }.bind(this));
149 }.bind(this)); 149 }.bind(this));
150 } 150 }
151 }; 151 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698