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

Side by Side Diff: ui/file_manager/image_loader/image_loader.js

Issue 1034873002: Add a subtle reminder that chrome_extensions.js is overwritten. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fun Created 5 years, 9 months 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 | « third_party/closure_compiler/externs/chrome_extensions.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 * Loads and resizes an image. 6 * Loads and resizes an image.
7 * @constructor 7 * @constructor
8 */ 8 */
9 function ImageLoader() { 9 function ImageLoader() {
10 /** 10 /**
(...skipping 24 matching lines...) Expand all
35 function(event) { 35 function(event) {
36 if (event.eventType === 'mount' && event.status === 'success') { 36 if (event.eventType === 'mount' && event.status === 'success') {
37 chrome.fileSystem.requestFileSystem( 37 chrome.fileSystem.requestFileSystem(
38 {volumeId: event.volumeMetadata.volumeId}, function() {}); 38 {volumeId: event.volumeMetadata.volumeId}, function() {});
39 } 39 }
40 }); 40 });
41 var initPromises = volumeMetadataList.map(function(volumeMetadata) { 41 var initPromises = volumeMetadataList.map(function(volumeMetadata) {
42 var requestPromise = new Promise(function(callback) { 42 var requestPromise = new Promise(function(callback) {
43 chrome.fileSystem.requestFileSystem( 43 chrome.fileSystem.requestFileSystem(
44 {volumeId: volumeMetadata.volumeId}, 44 {volumeId: volumeMetadata.volumeId},
45 callback); 45 /** @type {function(FileSystem=)} */(callback));
46 }); 46 });
47 return requestPromise; 47 return requestPromise;
48 }); 48 });
49 initPromises.push(new Promise(function(resolve, reject) { 49 initPromises.push(new Promise(function(resolve, reject) {
50 this.cache_.initialize(resolve); 50 this.cache_.initialize(resolve);
51 }.bind(this))); 51 }.bind(this)));
52 52
53 // After all initialization promises are done, start the scheduler. 53 // After all initialization promises are done, start the scheduler.
54 Promise.all(initPromises).then(this.scheduler_.start.bind(this.scheduler_)); 54 Promise.all(initPromises).then(this.scheduler_.start.bind(this.scheduler_));
55 }.bind(this)); 55 }.bind(this));
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 var targetContext = target.getContext('2d'); 220 var targetContext = target.getContext('2d');
221 targetContext.save(); 221 targetContext.save();
222 orientation.cancelImageOrientation( 222 orientation.cancelImageOrientation(
223 targetContext, targetDimensions.width, targetDimensions.height); 223 targetContext, targetDimensions.width, targetDimensions.height);
224 targetContext.drawImage( 224 targetContext.drawImage(
225 source, 225 source,
226 0, 0, source.width, source.height, 226 0, 0, source.width, source.height,
227 0, 0, targetDimensions.width, targetDimensions.height); 227 0, 0, targetDimensions.width, targetDimensions.height);
228 targetContext.restore(); 228 targetContext.restore();
229 }; 229 };
OLDNEW
« no previous file with comments | « third_party/closure_compiler/externs/chrome_extensions.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698