| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /** | 5 /** |
| 6 * Scrollable thumbnail ribbon at the bottom of the Gallery in the Slide mode. | 6 * Scrollable thumbnail ribbon at the bottom of the Gallery in the Slide mode. |
| 7 * | 7 * |
| 8 * @param {!Document} document Document. | 8 * @param {!Document} document Document. |
| 9 * @param {!Window} targetWindow A window which this ribbon is attached to. | 9 * @param {!Window} targetWindow A window which this ribbon is attached to. |
| 10 * @param {!cr.ui.ArrayDataModel} dataModel Data model. | 10 * @param {!cr.ui.ArrayDataModel} dataModel Data model. |
| 11 * @param {!cr.ui.ListSelectionModel} selectionModel Selection model. | 11 * @param {!cr.ui.ListSelectionModel} selectionModel Selection model. |
| 12 * @param {!ThumbnailModel} thumbnailModel | 12 * @param {!ThumbnailModel} thumbnailModel |
| 13 * @extends {HTMLDivElement} | 13 * @extends {HTMLDivElement} |
| 14 * @constructor | 14 * @constructor |
| 15 * @suppress {checkStructDictInheritance} | |
| 16 * @struct | 15 * @struct |
| 17 */ | 16 */ |
| 18 function Ribbon( | 17 function Ribbon( |
| 19 document, targetWindow, dataModel, selectionModel, thumbnailModel) { | 18 document, targetWindow, dataModel, selectionModel, thumbnailModel) { |
| 20 if (this instanceof Ribbon) { | 19 if (this instanceof Ribbon) { |
| 21 return Ribbon.call(/** @type {Ribbon} */ (document.createElement('div')), | 20 return Ribbon.call(/** @type {Ribbon} */ (document.createElement('div')), |
| 22 document, targetWindow, dataModel, selectionModel, thumbnailModel); | 21 document, targetWindow, dataModel, selectionModel, thumbnailModel); |
| 23 } | 22 } |
| 24 | 23 |
| 25 this.__proto__ = Ribbon.prototype; | 24 this.__proto__ = Ribbon.prototype; |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 * @param {string} oldUrl Old url. | 504 * @param {string} oldUrl Old url. |
| 506 * @param {string} newUrl New url. | 505 * @param {string} newUrl New url. |
| 507 * @private | 506 * @private |
| 508 */ | 507 */ |
| 509 Ribbon.prototype.remapCache_ = function(oldUrl, newUrl) { | 508 Ribbon.prototype.remapCache_ = function(oldUrl, newUrl) { |
| 510 if (oldUrl != newUrl && (oldUrl in this.renderCache_)) { | 509 if (oldUrl != newUrl && (oldUrl in this.renderCache_)) { |
| 511 this.renderCache_[newUrl] = this.renderCache_[oldUrl]; | 510 this.renderCache_[newUrl] = this.renderCache_[oldUrl]; |
| 512 delete this.renderCache_[oldUrl]; | 511 delete this.renderCache_[oldUrl]; |
| 513 } | 512 } |
| 514 }; | 513 }; |
| OLD | NEW |