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

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

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase 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 ad7eb42e40807c77199ed201ff86995a2f4fa50f..9a468232715c741defce1d5251bad2578d00ea58 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
@@ -305,6 +305,13 @@ CWSWidgetContainer.prototype.createTokenGetter_ = function() {
};
/**
+ * @return {boolean} Whether the container is in initial state, i.e. inactive.
+ */
+CWSWidgetContainer.prototype.isInInitialState = function() {
+ return this.state_ === CWSWidgetContainer.State.UNINITIALIZED;
+};
+
+/**
* Ensures that the widget container is in the state where it can properly
* handle showing the Chrome Web Store webview.
* @return {Promise} Resolved when the container is ready to be used.
@@ -655,11 +662,15 @@ CWSWidgetContainer.prototype.reset_ = function () {
this.webviewClient_ = null;
}
- if (this.webview_)
+ if (this.webview_) {
this.webviewContainer_.removeChild(this.webview_);
+ this.webview_ = null;
+ }
- if (this.appInstaller_)
+ if (this.appInstaller_) {
this.appInstaller_.cancel();
+ this.appInstaller_ = null;
+ }
this.options_ = null;
« no previous file with comments | « ui/events/test/event_generator.cc ('k') | ui/file_manager/file_manager/foreground/js/ui/suggest_apps_dialog.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698