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

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

Issue 23483029: [Files.app] Not to capture mouse events when the suggest app dialog is visible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/default_action_dialog.js
diff --git a/chrome/browser/resources/file_manager/js/default_action_dialog.js b/chrome/browser/resources/file_manager/js/default_action_dialog.js
index 55ed02eb440040323989f61ca7dcb525f37222b2..a5c8290a2397b3b6b0097df240bb7167a14787e0 100644
--- a/chrome/browser/resources/file_manager/js/default_action_dialog.js
+++ b/chrome/browser/resources/file_manager/js/default_action_dialog.js
@@ -17,10 +17,10 @@ cr.define('cr.filebrowser', function() {
*
* @param {HTMLElement} parentNode Node to be parent for this dialog.
* @constructor
- * @extends {cr.ui.dialogs.BaseDialog}
+ * @extends {FileManagerDialogBase}
*/
function DefaultActionDialog(parentNode) {
- cr.ui.dialogs.BaseDialog.call(this, parentNode);
+ FileManagerDialogBase.call(this, parentNode);
this.frame_.id = 'default-action-dialog';
@@ -49,7 +49,7 @@ cr.define('cr.filebrowser', function() {
}
DefaultActionDialog.prototype = {
- __proto__: cr.ui.dialogs.BaseDialog.prototype
+ __proto__: FileManagerDialogBase.prototype
};
/**
@@ -93,15 +93,19 @@ cr.define('cr.filebrowser', function() {
* @param {string} message Message in dialog caption.
* @param {Array.<Object>} items Items to render in the list.
* @param {number} defaultIndex Item to select by default.
- * @param {function(Object=)} onOk OK callback with the selected item.
+ * @param {function(Object=)} opt_onOk OK callback with the selected item.
* @param {function()=} opt_onCancel Cancel callback.
- * @param {function()=} opt_onShow Show callback.
*/
DefaultActionDialog.prototype.show = function(title, message, items,
- defaultIndex, onOk, opt_onCancel, opt_onShow) {
+ defaultIndex, opt_onOk, opt_onCancel) {
- cr.ui.dialogs.BaseDialog.prototype.showWithTitle.apply(
- this, [title, message, onOk, opt_onCancel, opt_onShow]);
+ var show = FileManagerDialogBase.prototype.showOkCancelDialog.call(
+ this, title, message, opt_onOk, opt_onCancel);
+
+ if (!show) {
+ console.error('DefaultActionDialog can\'t be shown.');
+ return;
+ }
if (!message) {
this.text_.setAttribute('hidden', 'hidden');
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698