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

Unified Diff: public/platform/modules/presentation/WebPresentationClient.h

Issue 940503002: [PresentationAPI] Added plumbing for start/joinSession from JS to platform (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed comment 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
Index: public/platform/modules/presentation/WebPresentationClient.h
diff --git a/public/platform/modules/presentation/WebPresentationClient.h b/public/platform/modules/presentation/WebPresentationClient.h
index e09436322a0c58fd706935829288182c088c2fad..4f91a92d2707099e23963118c41c8ce319476dea 100644
--- a/public/platform/modules/presentation/WebPresentationClient.h
+++ b/public/platform/modules/presentation/WebPresentationClient.h
@@ -5,9 +5,18 @@
#ifndef WebPresentationClient_h
#define WebPresentationClient_h
+#include "public/platform/WebCallbacks.h"
+
namespace blink {
class WebPresentationController;
+class WebPresentationSessionClient;
+class WebString;
+
+struct WebPresentationError;
+
+typedef WebCallbacks<WebPresentationSessionClient, WebPresentationError>
+ WebPresentationSessionClientCallbacks;
// The implementation the embedder has to provide for the Presentation API to work.
class WebPresentationClient {
@@ -20,6 +29,14 @@ public:
// Called when the frame attaches the first event listener to or removes the
// last event listener from the |availablechange| event.
virtual void updateAvailableChangeWatched(bool watched) = 0;
+
+ // Called when the frame request to start a new session.
+ // The ownership of the |callbacks| argument is transferred to the embedder.
+ virtual void startSession(const WebString& presentationUrl, const WebString& presentationId, WebPresentationSessionClientCallbacks*) = 0;
+
+ // Called when the frame request to start a new session.
+ // The ownership of the |callbacks| argument is transferred to the embedder.
+ virtual void joinSession(const WebString& presentationUrl, const WebString& presentationId, WebPresentationSessionClientCallbacks*) = 0;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698