Chromium Code Reviews| Index: chrome/browser/resources/md_downloads/focus_row.js |
| diff --git a/chrome/browser/resources/md_downloads/focus_row.js b/chrome/browser/resources/md_downloads/focus_row.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..deb592e3f48ba787e49e3694c78f3b402af0e6e2 |
| --- /dev/null |
| +++ b/chrome/browser/resources/md_downloads/focus_row.js |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +cr.define('downloads', function() { |
| + /** |
| + * @param {!Element} root |
| + * @param {?Node} boundary |
| + * @constructor |
| + * @extends {cr.ui.FocusRow} |
| + */ |
| + function FocusRow(root, boundary) { |
| + cr.ui.FocusRow.call(this, root, boundary); |
| + |
| + this.addItem('name-file-link', |
| + '#content.is-active:not(.show-progress) #name'); |
| + assert(this.addItem('name-file-link', '#file-link')); |
| + assert(this.addItem('url', '#url')); |
| + assert(this.addItem('show-retry', '#show')); |
| + assert(this.addItem('show-retry', '#retry')); |
| + assert(this.addItem('pause-resume', '#pause')); |
| + assert(this.addItem('pause-resume', '#resume')); |
| + assert(this.addItem('cancel', '#cancel')); |
| + this.addItem('controlled-by', '#controlled-by a'); |
|
hcarmona
2015/08/24 21:00:37
Why no assert for this?
Dan Beam
2015/08/24 22:59:30
it's not guaranteed to exist
hcarmona
2015/08/24 23:49:19
Acknowledged.
|
| + assert(this.addItem('danger-remove-discard', '#discard')); |
| + assert(this.addItem('restore-save', '#save')); |
| + assert(this.addItem('danger-remove-discard', '#danger-remove')); |
| + assert(this.addItem('restore-save', '#restore')); |
| + assert(this.addItem('remove', '#remove')); |
| + } |
| + |
| + FocusRow.prototype = {__proto__: cr.ui.FocusRow.prototype}; |
| + |
| + return {FocusRow: FocusRow}; |
| +}); |