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

Unified Diff: ui/webui/resources/js/cr/ui/focus_row.js

Issue 895283002: Fix Closure Compilation for chrome://downloads and chrome://history (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: ui/webui/resources/js/cr/ui/focus_row.js
diff --git a/ui/webui/resources/js/cr/ui/focus_row.js b/ui/webui/resources/js/cr/ui/focus_row.js
index 697cd699c538a60a4c45eff83cafe558fb452cd5..46c4d166ee3aa67dec6892de8d0e556470f2a6af 100644
--- a/ui/webui/resources/js/cr/ui/focus_row.js
+++ b/ui/webui/resources/js/cr/ui/focus_row.js
@@ -29,6 +29,7 @@ cr.define('cr.ui', function() {
* any focus change deactivates the row.
*
* @constructor
+ * @extends {HTMLDivElement}
*/
function FocusRow() {}
@@ -59,7 +60,8 @@ cr.define('cr.ui', function() {
/**
* Should be called in the constructor to decorate |this|.
* @param {Node} boundary Focus events are ignored outside of this node.
- * @param {FocusRow.Delegate=} opt_delegate A delegate to handle key events.
+ * @param {cr.ui.FocusRow.Delegate=} opt_delegate A delegate to handle key
+ * events.
*/
decorate: function(boundary, opt_delegate) {
/** @private {!Node} */
@@ -90,7 +92,7 @@ cr.define('cr.ui', function() {
* which previously held focus.
* @return {!Element} The element that best matches sampleElement.
*/
- getEquivalentElement: assertNotReached,
+ getEquivalentElement: function(sampleElement) { assertNotReached(); },
/**
* Add an element to this FocusRow. No-op if |element| is not provided.
@@ -149,7 +151,7 @@ cr.define('cr.ui', function() {
*/
onFocusin_: function(e) {
if (this.boundary_.contains(assertInstanceof(e.target, Node)))
- this.onFocusChange_(e.target);
+ this.onFocusChange_(/** @type {Element} */ (e.target));
},
/**
@@ -158,7 +160,7 @@ cr.define('cr.ui', function() {
* @private
*/
onKeydown_: function(e) {
- if (!this.contains(e.target))
+ if (!this.contains(/** @type {Node} */ (e.target)))
return;
if (this.delegate && this.delegate.onKeydown(this, e))
@@ -194,7 +196,7 @@ cr.define('cr.ui', function() {
// Only accept the left mouse click.
if (!e.button) {
// Focus this row if the target is one of the elements in this row.
- this.onFocusChange_(e.target);
+ this.onFocusChange_(/** @type {Element} */ (e.target));
}
},
};
« ui/webui/resources/js/cr/ui/focus_grid.js ('K') | « ui/webui/resources/js/cr/ui/focus_grid.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698