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

Unified Diff: Source/modules/presentation/Presentation.h

Issue 1020303004: [PresentationAPI] Plumbing |onstatechange| event for the PresentationSession from Blink to platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added a return statement for the conversion function Created 5 years, 9 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 | « no previous file | Source/modules/presentation/Presentation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/presentation/Presentation.h
diff --git a/Source/modules/presentation/Presentation.h b/Source/modules/presentation/Presentation.h
index 8a5ce56b7ffacd79e69c2b1c3bbe3ed1e235e886..b703f5646a9c0fd6a71ddeaa7a37f578ab79877f 100644
--- a/Source/modules/presentation/Presentation.h
+++ b/Source/modules/presentation/Presentation.h
@@ -21,6 +21,8 @@ namespace blink {
class LocalFrame;
class PresentationController;
class ScriptState;
+class WebPresentationSessionClient;
+enum class WebPresentationSessionState;
// Implements the main entry point of the Presentation API corresponding to the Presentation.idl
// See https://w3c.github.io/presentation-api/#navigatorpresentation for details.
@@ -62,6 +64,9 @@ public:
// Called when the |defaultsessionstart| event needs to be fired.
void didStartDefaultSession(PresentationSession*);
+ // Called when the |onstatechange| event needs to be fired to the right session.
+ void didChangeSessionState(WebPresentationSessionClient*, WebPresentationSessionState);
+
// Adds a session to the open sessions list.
void registerSession(PresentationSession*);
@@ -72,6 +77,9 @@ private:
// Can return |nullptr| if the frame is detached from the document.
PresentationController* presentationController();
+ // Returns the session that matches the WebPresentationSessionClient or null.
+ PresentationSession* findSession(WebPresentationSessionClient*);
+
// The session object provided to the presentation page. Not supported.
Member<PresentationSession> m_session;
« no previous file with comments | « no previous file | Source/modules/presentation/Presentation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698