| 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 /** | 5 /** |
| 6 * Thumbnail Mode. | 6 * Thumbnail Mode. |
| 7 * @param {!HTMLElement} container A container. | 7 * @param {!HTMLElement} container A container. |
| 8 * @param {!ErrorBanner} errorBanner Error banner. | 8 * @param {!ErrorBanner} errorBanner Error banner. |
| 9 * @param {!GalleryDataModel} dataModel Gallery data model. | 9 * @param {!GalleryDataModel} dataModel Gallery data model. |
| 10 * @param {!cr.ui.ListSelectionModel} selectionModel List selection model. | 10 * @param {!cr.ui.ListSelectionModel} selectionModel List selection model. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 ThumbnailMode.prototype.getName = function() { return 'thumbnail'; }; | 53 ThumbnailMode.prototype.getName = function() { return 'thumbnail'; }; |
| 54 | 54 |
| 55 /** | 55 /** |
| 56 * Returns title of this mode. | 56 * Returns title of this mode. |
| 57 * @return {string} Mode title. | 57 * @return {string} Mode title. |
| 58 */ | 58 */ |
| 59 ThumbnailMode.prototype.getTitle = function() { return 'GALLERY_THUMBNAIL'; }; | 59 ThumbnailMode.prototype.getTitle = function() { return 'GALLERY_THUMBNAIL'; }; |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * Returns current sub mode. | 62 * Returns current sub mode. |
| 63 * @return {Gallery.SubMode} | 63 * @return {GallerySubMode} |
| 64 */ | 64 */ |
| 65 ThumbnailMode.prototype.getSubMode = function() { | 65 ThumbnailMode.prototype.getSubMode = function() { |
| 66 return Gallery.SubMode.BROWSE; | 66 return GallerySubMode.BROWSE; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 /** | 69 /** |
| 70 * Executes an action. An action is executed immediately since this mode does | 70 * Executes an action. An action is executed immediately since this mode does |
| 71 * not have busy state. | 71 * not have busy state. |
| 72 */ | 72 */ |
| 73 ThumbnailMode.prototype.executeWhenReady = function(action) { action(); }; | 73 ThumbnailMode.prototype.executeWhenReady = function(action) { action(); }; |
| 74 | 74 |
| 75 /** | 75 /** |
| 76 * @return {boolean} Always true. Toolbar is always visible. | 76 * @return {boolean} Always true. Toolbar is always visible. |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 }; | 1018 }; |
| 1019 }.bind(this, this.thumbnailLoadRequestId_)) | 1019 }.bind(this, this.thumbnailLoadRequestId_)) |
| 1020 .catch(function(requestId, error) { | 1020 .catch(function(requestId, error) { |
| 1021 if (requestId !== this.thumbnailLoadRequestId_) | 1021 if (requestId !== this.thumbnailLoadRequestId_) |
| 1022 return null; | 1022 return null; |
| 1023 | 1023 |
| 1024 this.setError_(error); | 1024 this.setError_(error); |
| 1025 return null; | 1025 return null; |
| 1026 }.bind(this, this.thumbnailLoadRequestId_)); | 1026 }.bind(this, this.thumbnailLoadRequestId_)); |
| 1027 }; | 1027 }; |
| OLD | NEW |