Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1233)

Unified Diff: content/common/presentation/presentation_service.mojom

Issue 935083002: [PresentationAPI] Implementing start/joinSession from WebPresentationClient to PresentationService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated according to the Blink change Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/presentation/presentation_session.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..26374f1b64ab73893e3ba8e0bd59d4c53f3ecaa2 100644
--- a/content/common/presentation/presentation_service.mojom
+++ b/content/common/presentation/presentation_service.mojom
@@ -4,6 +4,26 @@
module presentation;
+import "presentation_session.mojom";
+
+struct PresentationSessionInfo {
+ PresentationSession session;
+ string url;
+ string id;
+};
+
+enum PresentationErrorType {
+ NO_AVAILABLE_SCREENS,
+ SESSION_REQUEST_CANCELLED,
+ NO_PRESENTATION_FOUND,
+ UNKNOWN,
+};
+
+struct PresentationError {
+ PresentationErrorType errorType;
+ string message;
+};
+
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 +38,24 @@ 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 a non-null PresentationSessionInfo if starting the session
+ // succeeded (so the session object is valid) or an error message if
mark a. foltz 2015/02/26 00:13:42 I would say: will return a non-null and valid Pre
whywhat 2015/02/26 16:15:07 Done.
+ // starting the session failed.
+ // The presentation id is always returned along with the initialized
+ // session on success.
+ // 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 the
+ // UA will generate the presentation id.
+ StartSession(string presentation_url, string? presentation_id)
+ => (PresentationSessionInfo? sessionInfo, PresentationError? error);
+
+ // Called when joinSession() is called by the frame. The result callback
+ // works the same as for the method above. JoinSession is used to silently
mark a. foltz 2015/02/26 00:13:42 JoinSession will join a known session (i.e. ...) s
whywhat 2015/02/26 16:15:07 Done.
+ // (no user action needed) join a known session (i.e. when the page
+ // navigates or the user opens another tab).
+ JoinSession(string presentation_url, string? presentation_id)
+ => (PresentationSessionInfo? sessionInfo, PresentationError? error);
};
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/presentation/presentation_session.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698