Index: content/common/presentation/presentation_service.mojom |
diff --git a/content/common/presentation/presentation_service.mojom b/content/common/presentation/presentation_service.mojom |
index 2ff381a41cb5d2f7affb681cf2cc65dfddadd909..774fe30787824f00e44c21b3bc0272b777efedeb 100644 |
--- a/content/common/presentation/presentation_service.mojom |
+++ b/content/common/presentation/presentation_service.mojom |
@@ -4,6 +4,8 @@ |
module presentation; |
+import "presentation_session.mojom"; |
+ |
interface PresentationService { |
// Returns the last screen availability state if it’s changed since the last |
// time the method was called. The client has to call this method again when |
@@ -18,4 +20,33 @@ interface PresentationService { |
// Called when the frame no longer listens to the |
// |availablechange| event. |
OnScreenAvailabilityListenerRemoved(); |
+ |
+ // Called when startSession() is called by the frame. The result callback |
+ // will return true if starting the session succeeded (so the session object |
+ // is valid) or false with an error message if starting the session failed. |
+ // If the UA identifies a matching session (same presentation url and id), |
+ // the user may choose this existing session and the page will join it |
+ // rather than get a new one. An empty presentation id means that any page |
+ // can join the session later on. |
+ StartSession( |
+ string presentation_url, |
+ string? presentation_id) => ( |
+ bool success, |
mlamouri (slow - plz ping)
2015/02/18 15:16:43
Maybe the following would match style better:
Sta
whywhat
2015/02/19 16:32:22
Done.
|
+ PresentationSession&? session, |
+ string? error, |
+ string? url, |
+ string? id); |
mlamouri (slow - plz ping)
2015/02/18 15:16:41
Maybe you could have something more generic here?
whywhat
2015/02/19 16:32:22
Done.
|
+ |
+ // Called when joinSession() is called by the frame. The result callback |
+ // works the same as for the method above. JoinSession is used to silently |
+ // (no user action needed) rejoin the known session (i.e. when the page |
mlamouri (slow - plz ping)
2015/02/18 15:16:42
s/the/a/ ?
whywhat
2015/02/19 16:32:22
Done.
|
+ // navigates or the user opens another tab). |
+ JoinSession( |
+ string presentation_url, |
+ string? presentation_id) => ( |
+ bool success, |
+ PresentationSession&? session, |
+ string? url, |
+ string? id, |
+ string? error); |
mlamouri (slow - plz ping)
2015/02/18 15:16:43
ditto.
whywhat
2015/02/19 16:32:22
Done.
|
}; |