Closed
Bug 1208563
Opened 9 years ago
Closed 9 years ago
Implement chrome.extension.inIncognitoContext property
Categories
(WebExtensions :: Untriaged, defect, P3)
WebExtensions
Untriaged
Tracking
(firefox44 fixed)
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: callahad, Assigned: evilpie)
References
(Blocks 1 open bug)
Details
(Keywords: DevAdvocacy, Whiteboard: [extension])
Attachments
(1 file)
(deleted),
patch
|
billm
:
review+
|
Details | Diff | Splinter Review |
Reference: https://developer.chrome.com/extensions/extension#property-inIncognitoContext
This is used by the Chrome version of the Reddit Enhancement Suite add-on. The Jetpack version uses sdk/private-browsing's isPrivate(window) function for equivalent functionality.
Reporter | ||
Updated•9 years ago
|
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → evilpies
Assignee | ||
Comment 1•9 years ago
|
||
So we have actually implemented this already for content scripts. And that seems to be hit when I inline view an image on reddit with RES. When was this undefined? The documentation claims we should implement this for tabs as well. Additionally I think it also makes sense for popups, because we reload these every time anyway.
I think the one part here is that browser.extension is defined in ext-extension.js, which is part of toolkit. That part of the code isn't supposed to know about tabs or popups. However, extensions.registerAPI can be used to extend the API arbitrarily. So you can use extensions.registerAPI from ext-tabs.js to add inIncognitoMode to browser.extension. And you can use the currentWindow function from there to get the current XUL window.
Assignee | ||
Comment 3•9 years ago
|
||
I had written this patch before.
Comment on attachment 8666418 [details] [diff] [review]
wip
Review of attachment 8666418 [details] [diff] [review]:
-----------------------------------------------------------------
This is actually just as good. It does bring up one issue. Right now we're not loading the browser action pop-up in private browsing mode if the window is private. We should probably do that.
Reporter | ||
Comment 5•9 years ago
|
||
This may be a documentation bug instead of an implementation bug :)
https://wiki.mozilla.org/WebExtensions says "we support only getBackgroundPage and getURL," so I didn't actually try the inIncognitoContext API.
Assignee | ||
Comment 6•9 years ago
|
||
>Right now we're not loading the browser action pop-up in private browsing mode if the window is private.
Seems complicated to do right now. They API is not accessible to JS.
Reporter | ||
Comment 7•9 years ago
|
||
(In reply to Bill McCloskey (:billm) from comment #4)
> Right now we're not loading the browser action pop-up in private browsing mode
> if the window is private. We should probably do that.
It seems like Chrome does that conditionally based on whether or not "incognito": "split" is set in the manifest, per the docs: "True for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only applies to extensions with 'split' incognito_behavior."
Since we don't currently support that manifest property, I'd propose marking this RESOLVED FIXED.
(I've verified that things look good for content scripts in https://github.com/callahad/webextension-tests/tree/master/incognito_context)
Reporter | ||
Comment 8•9 years ago
|
||
This no longer blocks Bug 1208765, as :evilpie noted, inIncognitoContext is not at full Chrome parity, but the manner in which RES uses it *is* supported.
No longer blocks: webext-port-reddit-enhancement-suite
Keywords: dev-doc-needed
Updated•9 years ago
|
Blocks: webextensions-chrome-gaps, 1213426
Whiteboard: [extension]
Priority: -- → P3
Attachment #8666418 -
Flags: review+
Comment 10•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Updated•6 years ago
|
Product: Toolkit → WebExtensions
Comment 11•5 years ago
|
||
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•