Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/child/utils.js

Issue 29329554: Issue 3208 - Send Private Browsing flag separately from the frame structure (Closed)
Patch Set: Fixed PrivateBrowsingUtils call Created Nov. 2, 2015, 6:52 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/child/elemHide.js ('k') | lib/elemHide.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/child/utils.js
===================================================================
--- a/lib/child/utils.js
+++ b/lib/child/utils.js
@@ -34,16 +34,22 @@ let getFrames = exports.getFrames = func
location: window.location.href,
sitekey: null
};
let documentElement = window.document && window.document.documentElement;
if (documentElement)
frame.sitekey = documentElement.getAttribute("data-adblockkey")
- if (window == window.parent)
- frame.privateBrowsing = PrivateBrowsingUtils.isWindowPrivate(window);
-
frames.push(frame);
window = (window != window.parent ? window.parent : null);
}
return frames;
-}
+};
+
+/**
+ * Checks whether Private Browsing mode is enabled for a content window.
+ * @return {Boolean}
+ */
+let isPrivate = exports.isPrivate = function(/**Window*/ window)
+{
+ return PrivateBrowsingUtils.isContentWindowPrivate(window);
+};
« no previous file with comments | « lib/child/elemHide.js ('k') | lib/elemHide.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld