Electrolysis/Geolocation: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
mNo edit summary
(Hmmm)
Line 12: Line 12:


The only other work that really needs to be done AFAICT is proxying the operations on the nsGeolocationService object.  There can either be separate nsGeolocationService objects for chrome/content, otherwise each method can check for a valid PContentProcessParent member and delegate through IPDL.
The only other work that really needs to be done AFAICT is proxying the operations on the nsGeolocationService object.  There can either be separate nsGeolocationService objects for chrome/content, otherwise each method can check for a valid PContentProcessParent member and delegate through IPDL.
-------
Since writing the above, I've realized that I was conflating nsGeolocation and nsGelocationService and their various operations in my mind.  The statements above are no longer necessarily true.

Revision as of 04:49, 24 March 2010

The only content-facing bits are in nsIDOMGeoGeolocation.idl, ie:

 void getCurrentPosition(nsIDOMGeoPositionCallback successCallback,
                         nsIDOMGeoPositionErrorCallback errorCallback,
                         nsIDOMGeoPositionOptions options);
 long watchPosition(nsIDOMGeoPositionCallback successCallback,
                    nsIDOMGeoPositionErrorCallback errorCallback,
                    nsIDOMGeoPositionOptions options);
 void clearWatch(long watchId);

The content process can create a GeoRequest actor that encapsulates and dispatches an asynchronous operation to the chrome process, which destroys the actor on completion, triggering the proper callback in content.

The only other work that really needs to be done AFAICT is proxying the operations on the nsGeolocationService object. There can either be separate nsGeolocationService objects for chrome/content, otherwise each method can check for a valid PContentProcessParent member and delegate through IPDL.


Since writing the above, I've realized that I was conflating nsGeolocation and nsGelocationService and their various operations in my mind. The statements above are no longer necessarily true.