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

Unified Diff: ui/file_manager/file_manager/foreground/js/cws_widget_container.js

Issue 1094553002: Revert "Speculative revert by sheriff" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: ui/file_manager/file_manager/foreground/js/cws_widget_container.js
diff --git a/ui/file_manager/file_manager/foreground/js/cws_widget_container.js b/ui/file_manager/file_manager/foreground/js/cws_widget_container.js
index 46183c710b99a5f7a4768c09a942105bf5d84560..45548c1c8e19d60142cb1f4a6d19e994fe3d693a 100644
--- a/ui/file_manager/file_manager/foreground/js/cws_widget_container.js
+++ b/ui/file_manager/file_manager/foreground/js/cws_widget_container.js
@@ -67,6 +67,8 @@ function CWSWidgetContainer(document, parentNode, state) {
this.webviewContainer_.style.height = WEBVIEW_HEIGHT + 'px';
parentNode.appendChild(this.webviewContainer_);
+ parentNode.classList.add('cws-widget-container-root');
+
/**
* Element showing spinner layout in place of Web Store widget.
* @type {!Element}
@@ -190,6 +192,13 @@ function CWSWidgetContainer(document, parentNode, state) {
* @private
*/
this.tokenGetter_ = this.createTokenGetter_();
+
+ /**
+ * Dialog to be shown when an installation attempt fails.
+ * @type {CWSWidgetContainerErrorDialog}
+ * @private
+ */
+ this.errorDialog_ = new CWSWidgetContainerErrorDialog(parentNode);
}
/**
@@ -519,8 +528,7 @@ CWSWidgetContainer.prototype.onItemInstalled_ = function(result, error) {
case AppInstaller.Result.ERROR:
CWSWidgetContainer.Metrics.recordInstall(
CWSWidgetContainer.Metrics.INSTALL.FAILED);
- // TODO(tbarzic): Remove dialog showing call from this class.
- fileManager.ui.errorDialog.show(
+ this.errorDialog_.show(
str('SUGGEST_DIALOG_INSTALLATION_FAILED'),
null,
null,
@@ -644,6 +652,9 @@ CWSWidgetContainer.prototype.reset_ = function () {
this.appInstaller_.cancel();
this.options_ = null;
+
+ if (this.errorDialog_.shown())
+ this.errorDialog_.hide();
};
/**

Powered by Google App Engine
This is Rietveld 408576698