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

Unified Diff: Source/modules/presentation/PresentationController.cpp

Issue 974993002: [Presentation API] Added the DefaultPresentationStart event and parsing of the default presentation… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Default implementation for the new WebPresentationClient method 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: Source/modules/presentation/PresentationController.cpp
diff --git a/Source/modules/presentation/PresentationController.cpp b/Source/modules/presentation/PresentationController.cpp
index 3b0c26cc2850685fde0b097d2223cd9fd8df2522..e972d412ec5c078c0c81e137f011af6e387282d9 100644
--- a/Source/modules/presentation/PresentationController.cpp
+++ b/Source/modules/presentation/PresentationController.cpp
@@ -6,6 +6,7 @@
#include "modules/presentation/PresentationController.h"
#include "core/frame/LocalFrame.h"
+#include "modules/presentation/PresentationSession.h"
#include "public/platform/modules/presentation/WebPresentationClient.h"
namespace blink {
@@ -74,6 +75,30 @@ void PresentationController::updateAvailableChangeWatched(bool watched)
m_client->updateAvailableChangeWatched(watched);
}
+void PresentationController::didStartDefaultPresentation(WebPresentationSessionClient* sessionClient)
+{
+ if (!m_presentation) {
+ PresentationSession::dispose(sessionClient);
+ return;
+ }
+
+ PresentationSession* session = PresentationSession::take(sessionClient, m_presentation);
+ m_presentation->didStartDefaultPresentation(session);
+}
+
+bool PresentationController::isDefaultPresentationStartWatched() const
+{
+ if (!m_presentation)
+ return false;
+ return m_presentation->isDefaultPresentationStartWatched();
+}
+
+void PresentationController::updateDefaultPresentationStartWatched(bool watched)
+{
+ if (m_client)
+ m_client->updateDefaultPresentationStartWatched(watched);
+}
+
void PresentationController::startSession(const String& presentationUrl, const String& presentationId, WebPresentationSessionClientCallbacks* callbacks)
{
if (!m_client) {

Powered by Google App Engine
This is Rietveld 408576698