Bug 844183: Uplift Add-on SDK changeset 2bee189e1cb87f5fbe38ce862c8ff35ee0978480

bf2c2f609b...2bee189e1c
This commit is contained in:
Dave Townsend
2013-02-22 10:22:25 -08:00
parent 84b52575a8
commit d3d3a8b3b2
27 changed files with 891 additions and 494 deletions

View File

@@ -19,7 +19,8 @@ const { Cc, Ci, Cr } = require('chrome'),
{ ns } = require('../core/namespace'),
{ observer: windowObserver } = require('./observer'),
{ getOwnerWindow } = require('../private-browsing/window/utils'),
viewNS = require('sdk/core/namespace').ns();
viewNS = require('../core/namespace').ns(),
{ isPrivateBrowsingSupported } = require('../self');
/**
* Window trait composes safe wrappers for browser window that are E10S
@@ -68,7 +69,7 @@ const BrowserWindowTrait = Trait.compose(
this._tabOptions = [ Options(options.url) ];
}
this._private = !!options.private;
this._isPrivate = isPrivateBrowsingSupported && !!options.isPrivate;
this._load();
@@ -209,9 +210,13 @@ const browserWindows = Trait.resolve({ toString: null }).compose(
return window ? BrowserWindow({window: window}) : null;
},
open: function open(options) {
if (typeof options === "string")
if (typeof options === "string") {
// `tabs` option is under review and may be removed.
options = { tabs: [Options(options)] };
options = {
tabs: [Options(options)],
isPrivate: isPrivateBrowsingSupported && options.isPrivate
};
}
return BrowserWindow(options);
},