Electrolysis/Geolocation: Difference between revisions

Actual thought and research put into the design this time
(Hmmm)
(Actual thought and research put into the design this time)
 
Line 9: Line 9:
   void clearWatch(long watchId);
   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 nsGeolocation class can be split into chrome and content objects, with all of the current functionality moving into chrome.


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.
When content calls the above functions, the content process can create an actor that encapsulates and dispatches an asynchronous operation to the chrome process.  The encapsulating actor on the chrome side runs the requested action, passing specially-implemented callbacks that send a serialized position update or error message to the child.  The child actor stores the content callbacks and executes them accordingly.
 
-------
 
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.
Confirmed users
512

edits