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

Unified Diff: chrome/browser/resources/file_manager/js/suggest_apps_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: Rename enableDragOnTitleArea -> onDialogShownOrHidden 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
Index: chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
diff --git a/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js b/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
index 3ddc2e32af32a679b98a8575b4bf12e5b4e77bb3..e052bfcae4e7c9865ea2af1a72026c53dd599a4c 100644
--- a/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
+++ b/chrome/browser/resources/file_manager/js/suggest_apps_dialog.js
@@ -89,10 +89,10 @@ var REGEXP_LOCALHOST_MATCH = /^https?:\/\/localhost(?:\:\d{1,5})?$/;
*
* @param {HTMLElement} parentNode Node to be parent for this dialog.
* @constructor
- * @extends {cr.ui.dialogs.BaseDialog}
+ * @extends {FileManagerDialogBase}
*/
function SuggestAppsDialog(parentNode) {
- cr.ui.dialogs.BaseDialog.call(this, parentNode);
+ FileManagerDialogBase.call(this, parentNode);
this.frame_.id = 'suggest-app-dialog';
@@ -161,7 +161,7 @@ function SuggestAppsDialog(parentNode) {
}
SuggestAppsDialog.prototype = {
- __proto__: cr.ui.dialogs.BaseDialog.prototype
+ __proto__: FileManagerDialogBase.prototype
};
/**
@@ -267,8 +267,14 @@ SuggestAppsDialog.prototype.show = function(extension, mime, onDialogClosed) {
if (this.urlOverrided_)
title += ' [OVERRIDED]';
- cr.ui.dialogs.BaseDialog.prototype.showWithTitle.apply(
- this, [title, '', function() {}, null, null]);
+ var show =
+ FileManagerDialogBase.prototype.showTitleOnlyDialog.call(this, title);
+ if (!show) {
+ console.error('SuggestAppsDialog can\'t be shown');
+ this.state_ = SuggestAppsDialog.State.UNINITIALIZED;
+ this.onHide();
+ return;
+ }
this.webviewContainer_.innerHTML =
'<webview id="cws-widget" partition="persist:cwswidgets"></webview>';
@@ -424,7 +430,7 @@ SuggestAppsDialog.prototype.hide = function(opt_originalOnHide) {
this.extension_ = null;
this.mime_ = null;
- cr.ui.dialogs.BaseDialog.prototype.hide.call(
+ FileManagerDialogBase.prototype.hide.call(
this,
this.onHide_.bind(this, opt_originalOnHide));
};

Powered by Google App Engine
This is Rietveld 408576698