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

Side by Side Diff: chrome/browser/resources/file_manager/js/file_copy_manager.js

Issue 12790007: Fix File Copy Manager Wrapper to work in the strict mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_copy_manager_wrapper.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 'use strict'; 5 'use strict';
6 6
7 if (chrome.extension) { 7 if (chrome.extension) {
8 var getContentWindows = function() { 8 var getContentWindows = function() {
9 return chrome.extension.getViews(); 9 return chrome.extension.getViews();
10 }; 10 };
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 */ 298 */
299 FileCopyManager.prototype.sendEvent_ = function(eventName, eventArgs) { 299 FileCopyManager.prototype.sendEvent_ = function(eventName, eventArgs) {
300 if (this.cancelRequested_) 300 if (this.cancelRequested_)
301 return; // Swallow events until cancellation complete. 301 return; // Swallow events until cancellation complete.
302 302
303 eventArgs.status = this.getStatus(); 303 eventArgs.status = this.getStatus();
304 304
305 var windows = getContentWindows(); 305 var windows = getContentWindows();
306 for (var i = 0; i < windows.length; i++) { 306 for (var i = 0; i < windows.length; i++) {
307 var w = windows[i]; 307 var w = windows[i];
308 if (w.fileCopyManagerWrapper) 308 if (w.FileCopyManagerWrapper)
309 w.fileCopyManagerWrapper.onEvent(eventName, eventArgs); 309 w.FileCopyManagerWrapper.getInstance().onEvent(eventName, eventArgs);
310 } 310 }
311 }; 311 };
312 312
313 /** 313 /**
314 * Unloads the host page in 5 secs of idleing. Need to be called 314 * Unloads the host page in 5 secs of idleing. Need to be called
315 * each time this.copyTasks_.length or this.deleteTasks_.length 315 * each time this.copyTasks_.length or this.deleteTasks_.length
316 * changed. 316 * changed.
317 * 317 *
318 * @private 318 * @private
319 */ 319 */
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 // Assume self.cancelRequested_ == false. 1264 // Assume self.cancelRequested_ == false.
1265 // This moved us from 0 to 1 active tasks, let the servicing begin! 1265 // This moved us from 0 to 1 active tasks, let the servicing begin!
1266 self.serviceAllTasks_(); 1266 self.serviceAllTasks_();
1267 } else { 1267 } else {
1268 // Force to update the progress of butter bar when there are new tasks 1268 // Force to update the progress of butter bar when there are new tasks
1269 // coming while servicing current task. 1269 // coming while servicing current task.
1270 self.sendProgressEvent_('PROGRESS'); 1270 self.sendProgressEvent_('PROGRESS');
1271 } 1271 }
1272 }); 1272 });
1273 }; 1273 };
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_copy_manager_wrapper.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698