Electrolysis/Jetpack: Difference between revisions

Jump to navigation Jump to search
m
Formattting
(Cross-process windows)
m (Formattting)
Line 1: Line 1:
In order to move Jetpack to an out-of-process implementation, a mixture of CPOWs and proxying appears to be necessary.  I've encountered one main issue that must be considered:
In order to move Jetpack to an out-of-process implementation, a mixture of CPOWs and proxying appears to be necessary.  I've encountered one main issue that must be considered:


== Using callbacks ==
<h3>Using callbacks</h3>


Given an API that allows the following:
Given an API that allows the following:
Line 82: Line 82:
Still, that's just an implementation detail.
Still, that's just an implementation detail.


== Accessing windows ==
<h3>Accessing windows</h3>


Some jetpacks do things like the following:
Some jetpacks do things like the following:


   var win = Components.classes["@mozilla.org/appshell/window-mediator;1"]
   var win = Components.classes["@mozilla.org/appshell/window-mediator;1"]
    .getService(Components.interfaces.nsIWindowMediator)
            .getService(Components.interfaces.nsIWindowMediator)
    .getMostRecentWindow("navigator:browser");
            .getMostRecentWindow("navigator:browser");


I'm not yet sure what the best way to deal with this is.  Perhaps create an API that wraps the window mediator and allows you to get specific windows in well-defined ways?  Perhaps proxying the window mediator component to return CPOWs or something?
I'm not yet sure what the best way to deal with this is.  Perhaps create an API that wraps the window mediator and allows you to get specific windows in well-defined ways?  Perhaps proxying the window mediator component to return CPOWs or something?
Confirmed users
512

edits

Navigation menu