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

Unified Diff: remoting/webapp/base/js/base.js

Issue 868203002: Handle authentication failures in the v2 app by restarting the app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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: remoting/webapp/base/js/base.js
diff --git a/remoting/webapp/base/js/base.js b/remoting/webapp/base/js/base.js
index 86c91565bb9f1907eaa792dbafeb4dcb5f0e187f..97fa5360d895ec2ed27c6cc6967b6b43a806c0be 100644
--- a/remoting/webapp/base/js/base.js
+++ b/remoting/webapp/base/js/base.js
@@ -467,4 +467,12 @@ base.jsonParseSafe = function(jsonString) {
} catch (err) {
return undefined;
}
-}
+};
+
+/**
+ * @return {boolean} whether the calling script is executing in the background
+ * page or not.
+ */
+base.isBackgroundPage = function() {
+ return base.isAppsV2() && !Boolean(chrome.app.window.current());
+};

Powered by Google App Engine
This is Rietveld 408576698