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

Unified Diff: chrome/browser/resources/file_manager/js/file_operation_manager_wrapper.js

Issue 39123003: [Files.app] Split the JavaScript files into subdirectories: common, background, and foreground (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed test failure. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/js/file_operation_manager_wrapper.js
diff --git a/chrome/browser/resources/file_manager/js/file_operation_manager_wrapper.js b/chrome/browser/resources/file_manager/js/file_operation_manager_wrapper.js
deleted file mode 100644
index 45c89c68f745e9e93bc6a996c311ef54d9863c92..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/file_manager/js/file_operation_manager_wrapper.js
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-'use strict';
-
-/**
- * While FileOperationManager is run in the background page, this class is
- * used to communicate with it.
- * @param {DOMWindow} backgroundPage Window object of the background page.
- * @constructor
- */
-function FileOperationManagerWrapper(backgroundPage) {
- this.fileOperationManager_ =
- backgroundPage.FileOperationManager.getInstance();
-}
-
-/**
- * Create a new instance or get existing instance of FCMW.
- * @param {DOMWindow} backgroundPage Window object of the background page.
- * @return {FileOperationManagerWrapper} FileOperationManagerWrapper instance.
- */
-FileOperationManagerWrapper.getInstance = function(backgroundPage) {
- if (!FileOperationManagerWrapper.instance_)
- FileOperationManagerWrapper.instance_ =
- new FileOperationManagerWrapper(backgroundPage);
-
- return FileOperationManagerWrapper.instance_;
-};
-
-/**
- * @return {boolean} True if there is a running task.
- */
-FileOperationManagerWrapper.prototype.isRunning = function() {
- return this.fileOperationManager_.hasQueuedTasks();
-};
-
-/**
- * Decorates a FileOperationManager method, so it will be executed after
- * initializing the FileOperationManager instance in background page.
- * @param {string} method The method name.
- */
-FileOperationManagerWrapper.decorateAsyncMethod = function(method) {
- FileOperationManagerWrapper.prototype[method] = function() {
- this.fileOperationManager_.willRunNewMethod();
- this.fileOperationManager_[method].apply(
- this.fileOperationManager_, arguments);
- };
-};
-
-FileOperationManagerWrapper.decorateAsyncMethod('requestCancel');
-FileOperationManagerWrapper.decorateAsyncMethod('paste');
-FileOperationManagerWrapper.decorateAsyncMethod('deleteEntries');
-FileOperationManagerWrapper.decorateAsyncMethod('forceDeleteTask');
-FileOperationManagerWrapper.decorateAsyncMethod('cancelDeleteTask');
-FileOperationManagerWrapper.decorateAsyncMethod('zipSelection');
-FileOperationManagerWrapper.decorateAsyncMethod('addEventListener');
-FileOperationManagerWrapper.decorateAsyncMethod('removeEventListener');

Powered by Google App Engine
This is Rietveld 408576698