Closed Bug 1363132 Opened 7 years ago Closed 7 years ago

Support sdk/window/utils from a Web Extension

Categories

(WebExtensions :: Untriaged, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: clouserw, Unassigned)

Details

The Min Vid experiment uses sdk/window/utils.  This issue is to support that API via Web Extension or find alternatives that work.

Dave -- can you give some details on what you're using sdk/window/utils for?  It sounds like that file is pretty extensive so maybe we could just port over the needed parts.
To the extent that we're going to support anything like this, it's already supported by the browser.windows API.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
I would like hear the specific requests first.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Specific requests can get their own bugs. Implementing an equivalent of this module is a non-starter.
For Min Vid we are using a XUL window for the video player. We started out using the panel api provided by the addon-sdk, but found it too limiting for our usecase.

We currently use the getMostRecentBrowserWindow method from sdk/windows/utils to open a new xul window with the correct browser as the parent. This is so that when the user is done with their browsing session we can close the xul window as well.

here is a link to where we are using the method => https://github.com/meandavejustice/min-vid/blob/master/lib/window-utils.js#L100

For all of our other window needs (we have many) we are using xpcom utils, which get pretty complicated for our case. You can take a look at those here if interested.

* https://github.com/meandavejustice/min-vid/blob/master/lib/native-window-utils.js
* https://github.com/meandavejustice/min-vid/blob/master/lib/dragging-utils.js
* https://github.com/meandavejustice/min-vid/tree/master/lib/vendor/noitidart-ostypes
* https://github.com/meandavejustice/min-vid/blob/master/lib/topify.js

Jared Hirsch did most of this work, I'll direct him to this bug to get his input.
It seems like getting to a 100% webextension is a much bigger project that the scope of this bug.
If you just need getMostRecentBrowserWindow, I think you can just use RecentWindow.jsm?
> If you just need getMostRecentBrowserWindow, I think you can just use RecentWindow.jsm

Yeah, RecentWindow looks like a fine replacement.

I think we're safe to re-close this bug.
To be clear, it's highly unlikely that Min Vid would ever be a pure webextension: it uses js-ctypes code to modify the player window in ways that aren't even exposed by the platform APIs.
Status: REOPENED → RESOLVED
Closed: 7 years ago7 years ago
Resolution: --- → INVALID
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.