| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 cr.define('downloads', function() { | 5 cr.define('downloads', function() { |
| 6 var Item = Polymer({ | 6 var Item = Polymer({ |
| 7 is: 'downloads-item', | 7 is: 'downloads-item', |
| 8 | 8 |
| 9 properties: { | 9 properties: { |
| 10 data: { | 10 data: { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 !this.data.file_externally_removed; | 109 !this.data.file_externally_removed; |
| 110 }, | 110 }, |
| 111 | 111 |
| 112 /** @private */ | 112 /** @private */ |
| 113 computeControlledBy_: function() { | 113 computeControlledBy_: function() { |
| 114 if (!this.data.by_ext_id || !this.data.by_ext_name) | 114 if (!this.data.by_ext_id || !this.data.by_ext_name) |
| 115 return ''; | 115 return ''; |
| 116 | 116 |
| 117 var url = 'chrome://extensions#' + this.data.by_ext_id; | 117 var url = 'chrome://extensions#' + this.data.by_ext_id; |
| 118 var name = this.data.by_ext_name; | 118 var name = this.data.by_ext_name; |
| 119 return loadTimeData.getStringF('controlledByUrl', url, name); | 119 return loadTimeData.getStringF('controlledByUrl', url, HTMLEscape(name)); |
| 120 }, | 120 }, |
| 121 | 121 |
| 122 /** @private */ | 122 /** @private */ |
| 123 computeDangerIcon_: function() { | 123 computeDangerIcon_: function() { |
| 124 return this.isDangerous_ ? 'cr:warning' : ''; | 124 return this.isDangerous_ ? 'cr:warning' : ''; |
| 125 }, | 125 }, |
| 126 | 126 |
| 127 /** @private */ | 127 /** @private */ |
| 128 computeDate_: function() { | 128 computeDate_: function() { |
| 129 assert(typeof this.data.hideDate == 'boolean'); | 129 assert(typeof this.data.hideDate == 'boolean'); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 }, | 311 }, |
| 312 | 312 |
| 313 /** @private */ | 313 /** @private */ |
| 314 onShowTap_: function() { | 314 onShowTap_: function() { |
| 315 downloads.ActionService.getInstance().show(this.data.id); | 315 downloads.ActionService.getInstance().show(this.data.id); |
| 316 }, | 316 }, |
| 317 }); | 317 }); |
| 318 | 318 |
| 319 return {Item: Item}; | 319 return {Item: Item}; |
| 320 }); | 320 }); |
| OLD | NEW |