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

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

Issue 1222623003: Presentation API: implement .getAvalability() (Blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix tests Created 5 years, 5 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 f3b84a851d2e7ff9ebbf9450b42bd90eadd44cde..6492c29b5099cf7a509bdc7b10bbd89571a61218 100644
--- a/Source/modules/presentation/PresentationController.cpp
+++ b/Source/modules/presentation/PresentationController.cpp
@@ -49,6 +49,11 @@ void PresentationController::provideTo(LocalFrame& frame, WebPresentationClient*
WillBeHeapSupplement<LocalFrame>::provideTo(frame, PresentationController::supplementName(), PresentationController::create(frame, client));
}
+WebPresentationClient* PresentationController::client()
+{
+ return m_client;
+}
+
DEFINE_TRACE(PresentationController)
{
visitor->trace(m_presentation);
@@ -58,21 +63,11 @@ DEFINE_TRACE(PresentationController)
void PresentationController::didChangeAvailability(bool available)
{
- if (m_presentation)
- m_presentation->didChangeAvailability(available);
}
bool PresentationController::isAvailableChangeWatched() const
{
- if (!m_presentation)
- return false;
- return m_presentation->isAvailableChangeWatched();
-}
-
-void PresentationController::updateAvailableChangeWatched(bool watched)
-{
- if (m_client)
- m_client->updateAvailableChangeWatched(watched);
+ return false;
}
void PresentationController::didStartDefaultSession(WebPresentationSessionClient* sessionClient)
@@ -148,6 +143,13 @@ void PresentationController::closeSession(const String& url, const String& prese
m_client->closeSession(url, presentationId);
}
+void PresentationController::getAvailability(const String& presentationUrl, WebPresentationAvailabilityCallbacks* callbacks)
+{
+ if (!m_client)
+ return;
+ m_client->getAvailability(presentationUrl, callbacks);
+}
+
void PresentationController::setPresentation(Presentation* presentation)
{
m_presentation = presentation;

Powered by Google App Engine
This is Rietveld 408576698