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

Unified Diff: chrome/browser/resources/hotword/nacl_manager.js

Issue 658393003: Fix some straight-forward closure compiler errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove the @class annotation. 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
« no previous file with comments | « chrome/browser/resources/hotword/logging.js ('k') | chrome/browser/resources/hotword/page_audio_manager.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/hotword/nacl_manager.js
diff --git a/chrome/browser/resources/hotword/nacl_manager.js b/chrome/browser/resources/hotword/nacl_manager.js
index 79c1f3f1104a92f1c755ed883fb7140f1c36403f..fc0753f834f66fdb64dbd972c867396a98b7b2d4 100644
--- a/chrome/browser/resources/hotword/nacl_manager.js
+++ b/chrome/browser/resources/hotword/nacl_manager.js
@@ -40,7 +40,7 @@ function NaClManager() {
/**
* NaCl plugin element on extension background page.
- * @private {?Nacl}
+ * @private {?HTMLEmbedElement}
*/
this.plugin_ = null;
@@ -86,7 +86,7 @@ NaClManager.prototype.__proto__ = cr.EventTarget.prototype;
* @private
*/
NaClManager.prototype.handleError_ = function(error) {
- event = new Event(hotword.constants.Event.ERROR);
+ var event = new Event(hotword.constants.Event.ERROR);
event.data = error;
this.dispatchEvent(event);
};
@@ -198,11 +198,11 @@ NaClManager.prototype.getPossibleLanguages_ = function() {
/**
* Creates a NaCl plugin object and attaches it to the page.
* @param {!string} src Location of the plugin.
- * @return {!Nacl} NaCl plugin DOM object.
+ * @return {!HTMLEmbedElement} NaCl plugin DOM object.
* @private
*/
NaClManager.prototype.createPlugin_ = function(src) {
- var plugin = document.createElement('embed');
+ var plugin = /** @type {HTMLEmbedElement} */(document.createElement('embed'));
plugin.src = src;
plugin.type = 'application/x-nacl';
document.body.appendChild(plugin);
@@ -235,7 +235,7 @@ NaClManager.prototype.initialize = function(naclArch, stream) {
}
var plugin = this.createPlugin_(pluginSrc);
- this.plugin_ = /** @type {Nacl} */ (plugin);
+ this.plugin_ = plugin;
if (!this.plugin_ || !this.plugin_.postMessage) {
document.body.removeChild(this.plugin_);
this.recognizerState_ = ManagerState_.ERROR;
@@ -273,7 +273,7 @@ NaClManager.prototype.shutdown = function() {
/**
* Sends data to the NaCl plugin.
- * @param {!string} data Command to be sent to NaCl plugin.
+ * @param {!string|!MediaStreamTrack} data Command to be sent to NaCl plugin.
* @private
*/
NaClManager.prototype.sendDataToPlugin_ = function(data) {
« no previous file with comments | « chrome/browser/resources/hotword/logging.js ('k') | chrome/browser/resources/hotword/page_audio_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698