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

Unified Diff: Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp

Issue 13968007: Create WebInbandTextTrack and WebInbandTextTrackClient (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 7 years, 7 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 | « Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index 1160a423ae5c93edd2a178c9a9a38abeb65eabdf..7a656ae05bbc2515bf46be14c25979c96b985fdb 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -5,11 +5,13 @@
#include "config.h"
#include "WebMediaPlayerClientImpl.h"
+#include "InbandTextTrackPrivateImpl.h"
#include "WebAudioSourceProvider.h"
#include "WebDocument.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
#include "WebHelperPluginImpl.h"
+#include "WebInbandTextTrack.h"
#include "WebMediaPlayer.h"
#include "WebMediaSourceImpl.h"
#include "WebViewImpl.h"
@@ -296,6 +298,19 @@ void WebMediaPlayerClientImpl::setWebLayer(WebLayer* layer)
}
}
+void WebMediaPlayerClientImpl::addTextTrack(WebInbandTextTrack* textTrack)
+{
+ m_mediaPlayer->addTextTrack(adoptRef(new InbandTextTrackPrivateImpl(textTrack)));
+}
+
+void WebMediaPlayerClientImpl::removeTextTrack(WebInbandTextTrack* textTrack)
+{
+ // The following static_cast is safe, because we created the object with the textTrack
+ // that was passed to addTextTrack. (The object from which we are downcasting includes
+ // WebInbandTextTrack as one of the intefaces from which inherits.)
+ m_mediaPlayer->removeTextTrack(static_cast<InbandTextTrackPrivateImpl*>(textTrack->client()));
+}
+
// MediaPlayerPrivateInterface -------------------------------------------------
void WebMediaPlayerClientImpl::load(const String& url)
« no previous file with comments | « Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698