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

Unified Diff: chrome/browser/resources/print_preview/search/destination_list_item.js

Issue 2865633004: Fix all remaining print preview closure compiler errors (Closed)
Patch Set: Remove TODO and uncomment line Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/print_preview/search/destination_list_item.js
diff --git a/chrome/browser/resources/print_preview/search/destination_list_item.js b/chrome/browser/resources/print_preview/search/destination_list_item.js
index 58ded04a498b856881afd9fdd189b3a7594ebab7..e11ece5d082072bec7e7ed9aa280395f02dfdfc3 100644
--- a/chrome/browser/resources/print_preview/search/destination_list_item.js
+++ b/chrome/browser/resources/print_preview/search/destination_list_item.js
@@ -38,7 +38,7 @@ cr.define('print_preview', function() {
* @private
*/
this.query_ = query;
- };
+ }
/**
* Event types dispatched by the destination list item.
@@ -75,7 +75,7 @@ cr.define('print_preview', function() {
this.onRegisterPromoClicked_.bind(this));
},
- /** @return {!print_preiew.Destination} */
+ /** @return {!print_preview.Destination} */
get destination() {
return this.destination_;
},
@@ -241,7 +241,7 @@ cr.define('print_preview', function() {
/**
* Shows/Hides the configuring in progress message and starts/stops its
* animation accordingly.
- * @param {bool} show If the message and animation should be shown.
+ * @param {boolean} show If the message and animation should be shown.
* @private
*/
updateConfiguringMessage_: function(show) {
@@ -291,7 +291,7 @@ cr.define('print_preview', function() {
* @private
*/
onKeyDown_: function(e) {
- if (!hasKeyModifiers(e)) {
+ if (e && !hasKeyModifiers(e)) {
Dan Beam 2017/05/09 21:25:47 is this to avoid requiring !KeyboardEvent as the t
rbpotter 2017/05/09 22:32:14 Yes, changed to !KeyboardEvent.
if (e.keyCode == 13) {
var activeElementTag = document.activeElement ?
document.activeElement.tagName.toUpperCase() : '';
@@ -319,7 +319,7 @@ cr.define('print_preview', function() {
* Handles click and 'Enter' key down events for the extension icon element.
* It opens extensions page with the extension associated with the
* destination highlighted.
- * @param {MouseEvent|KeyboardEvent} e The event to handle.
+ * @param {Event} e The event to handle.
* @private
*/
onExtensionIconClicked_: function(e) {
@@ -330,15 +330,15 @@ cr.define('print_preview', function() {
/**
* Handles key down event for the extensin icon element. Keys different than
* 'Enter' are ignored.
- * @param {KeyboardEvent} e The event to handle.
+ * @param {Event} e The event to handle.
* @private
*/
onExtensionIconKeyDown_: function(e) {
- if (hasKeyModifiers(e))
+ if (e && hasKeyModifiers(e))
return;
if (e.keyCode != 13 /* Enter */)
return;
- this.onExtensionIconClicked_(event);
+ this.onExtensionIconClicked_(e);
}
};

Powered by Google App Engine
This is Rietveld 408576698