Closed Bug 809180 Opened 12 years ago Closed 11 years ago

Provide some feature detection for private browsing implementations

Categories

(Add-on SDK Graveyard :: General, defect, P1)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: canuckistani, Assigned: evold)

References

Details

We're going to have an awkward growing phase between Firefox 19 & 20 where private browsing features are implemented quite differently. Seeing as we will be continuing to implement activate and deactivate as no-ops that emit deprecation warnings for the forseeable future, we should consider implementing a flag that developers can access that indicates if PWPB is implemented in the current runtime.

Strawman:

var hasPWPB = require('private-browsing').hasPerWindowPrivateBrowsing || false;

This property could be a getter that sniffs the current Firefox version.

Thanks to :wenzel for the idea:

https://blog.mozilla.org/addons/2012/11/05/sdk-private-browsing-api-deprecation/comment-page-1/#comment-160596
Assignee: nobody → evold
I don't think pwpb will be the final iteration, so perhaps a getPBType method would make more sense?
If you're interested in detecting this in the code programatically, you can check for the existence of nsIPrivateBrowsingService.  We will soon remove it in bug 818800.
Depends on: 825338
https://github.com/mozilla/addon-sdk/commit/6a1aacd6b34ec8cfce1fe2875de45279c8254b54
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.