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

Unified Diff: chrome/browser/resources/file_manager/js/ui/file_manager_dialog_base.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/ui/file_manager_dialog_base.js
diff --git a/chrome/browser/resources/file_manager/js/ui/file_manager_dialog_base.js b/chrome/browser/resources/file_manager/js/ui/file_manager_dialog_base.js
deleted file mode 100644
index 6cc940f7e369571e36f3b35f417579962d0e2450..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/file_manager/js/ui/file_manager_dialog_base.js
+++ /dev/null
@@ -1,112 +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';
-
-/**
- * This class is an extended class, to manage the status of the dialogs.
- *
- * @param {HTMLElement} parentNode Parent node of the dialog.
- * @extends {cr.ui.dialogs.FileManagerDialogBase}
- * @constructor
- */
-var FileManagerDialogBase = function(parentNode) {
- cr.ui.dialogs.BaseDialog.call(this, parentNode);
-};
-
-FileManagerDialogBase.prototype = {
- __proto__: cr.ui.dialogs.BaseDialog.prototype
-};
-
-/**
- * The FileManager object. This is used to notify events of showing or hiding
- * dialog to file manager.
- *
- * @type {FileManager}
- * @private
- */
-FileManagerDialogBase.fileManager_ = null;
-
-/**
- * Setter of FileManagerDialogBase.fileManager_.
- * @param {FileManager} fileManager The fileManager object.
- */
-FileManagerDialogBase.setFileManager = function(fileManager) {
- FileManagerDialogBase.fileManager_ = fileManager;
-};
-
-/**
- * The flag if any dialog is shown. True if a dialog is visible, false
- * otherwise.
- * @type {boolean}
- */
-FileManagerDialogBase.shown = false;
-
-/**
- * @param {string} title Title.
- * @param {string} message Message.
- * @param {function()} onOk Called when the OK button is pressed.
- * @param {function()} onCancel Called when the cancel button is pressed.
- * @return {boolean} True if the dialog can show successfully. False if the
- * dialog failed to show due to an existing dialog.
- */
-FileManagerDialogBase.prototype.showOkCancelDialog = function(
- title, message, onOk, onCancel) {
- return this.showImpl_(title, message, onOk, onCancel);
-};
-
-/**
- * @param {string} title Title.
- * @param {string} message Message.
- * @param {function()} onOk Called when the OK button is pressed.
- * @param {function()} onCancel Called when the cancel button is pressed.
- * @return {boolean} True if the dialog can show successfully. False if the
- * dialog failed to show due to an existing dialog.
- * @private
- */
-FileManagerDialogBase.prototype.showImpl_ = function(
- title, message, onOk, onCancel) {
- if (FileManagerDialogBase.shown)
- return false;
-
- FileManagerDialogBase.shown = true;
- if (FileManagerDialogBase.fileManager_)
- FileManagerDialogBase.fileManager_.onDialogShownOrHidden(true);
- cr.ui.dialogs.BaseDialog.prototype.showWithTitle.call(
- this, title, message, onOk, onCancel, null);
-
- return true;
-};
-
-/**
- * @return {boolean} True if the dialog can show successfully. False if the
- * dialog failed to show due to an existing dialog.
- */
-FileManagerDialogBase.prototype.showBlankDialog = function() {
- return this.showImpl_('', '', null, null, null);
-};
-
-/**
- * @param {string} title Title.
- * @return {boolean} True if the dialog can show successfully. False if the
- * dialog failed to show due to an existing dialog.
- */
-FileManagerDialogBase.prototype.showTitleOnlyDialog = function(title) {
- return this.showImpl_(title, '', null, null, null);
-};
-
-/**
- * @param {function()=} opt_onHide Called when the dialog is hidden.
- */
-FileManagerDialogBase.prototype.hide = function(opt_onHide) {
- cr.ui.dialogs.BaseDialog.prototype.hide.call(
- this,
- function() {
- if (opt_onHide)
- opt_onHide();
- if (FileManagerDialogBase.fileManager_)
- FileManagerDialogBase.fileManager_.onDialogShownOrHidden(false);
- FileManagerDialogBase.shown = false;
- });
-};

Powered by Google App Engine
This is Rietveld 408576698