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

Side by Side Diff: ui/file_manager/gallery/js/gallery_item.js

Issue 792733002: Add type annotations to gallery/js/image_editor/image_view.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/file_manager/gallery/js/image_editor/image_buffer.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * Object representing an image item (a photo). 6 * Object representing an image item (a photo).
7 * 7 *
8 * @param {!FileEntry} entry Image entry. 8 * @param {!FileEntry} entry Image entry.
9 * @param {!EntryLocation} locationInfo Entry location information. 9 * @param {!EntryLocation} locationInfo Entry location information.
10 * @param {!Object} metadata Metadata for the entry. 10 * @param {!Object} metadata Metadata for the entry.
(...skipping 28 matching lines...) Expand all
39 * @const 39 * @const
40 */ 40 */
41 this.metadataCache_ = metadataCache; 41 this.metadataCache_ = metadataCache;
42 42
43 // TODO(yawano): Change this.contentImage and this.screenImage to private 43 // TODO(yawano): Change this.contentImage and this.screenImage to private
44 // fields and provide utility methods for them (e.g. revokeFullImageCache). 44 // fields and provide utility methods for them (e.g. revokeFullImageCache).
45 /** 45 /**
46 * The content cache is used for prefetching the next image when going through 46 * The content cache is used for prefetching the next image when going through
47 * the images sequentially. The real life photos can be large (18Mpix = 72Mb 47 * the images sequentially. The real life photos can be large (18Mpix = 72Mb
48 * pixel array) so we want only the minimum amount of caching. 48 * pixel array) so we want only the minimum amount of caching.
49 * @type {HTMLCanvasElement} 49 * @type {(HTMLCanvasElement|HTMLImageElement)}
50 */ 50 */
51 this.contentImage = null; 51 this.contentImage = null;
52 52
53 /** 53 /**
54 * We reuse previously generated screen-scale images so that going back to a 54 * We reuse previously generated screen-scale images so that going back to a
55 * recently loaded image looks instant even if the image is not in the content 55 * recently loaded image looks instant even if the image is not in the content
56 * cache any more. Screen-scale images are small (~1Mpix) so we can afford to 56 * cache any more. Screen-scale images are small (~1Mpix) so we can afford to
57 * cache more of them. 57 * cache more of them.
58 * @type {HTMLCanvasElement} 58 * @type {HTMLCanvasElement}
59 */ 59 */
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 return Promise.reject(str('GALLERY_FILE_EXISTS')); 354 return Promise.reject(str('GALLERY_FILE_EXISTS'));
355 }, function() { 355 }, function() {
356 return new Promise( 356 return new Promise(
357 this.entry_.moveTo.bind(this.entry_, parentDirectory, newFileName)); 357 this.entry_.moveTo.bind(this.entry_, parentDirectory, newFileName));
358 }.bind(this)); 358 }.bind(this));
359 }.bind(this)); 359 }.bind(this));
360 }.bind(this)).then(function(entry) { 360 }.bind(this)).then(function(entry) {
361 this.entry_ = entry; 361 this.entry_ = entry;
362 }.bind(this)); 362 }.bind(this));
363 }; 363 };
OLDNEW
« no previous file with comments | « no previous file | ui/file_manager/gallery/js/image_editor/image_buffer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698