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

Side by Side Diff: Source/web/WebMediaPlayerClientImpl.cpp

Issue 60083011: Remove InbandTextTrackPrivate/InbandTextTrackPrivateClient (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase on top of https://codereview.chromium.org/61763010/ Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | Source/web/web.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "WebMediaPlayerClientImpl.h" 6 #include "WebMediaPlayerClientImpl.h"
7 7
8 #include "InbandTextTrackPrivateImpl.h"
9 #include "MediaSourcePrivateImpl.h" 8 #include "MediaSourcePrivateImpl.h"
10 #include "WebDocument.h" 9 #include "WebDocument.h"
11 #include "WebFrameClient.h" 10 #include "WebFrameClient.h"
12 #include "WebFrameImpl.h" 11 #include "WebFrameImpl.h"
13 #include "WebHelperPluginImpl.h" 12 #include "WebHelperPluginImpl.h"
14 #include "WebInbandTextTrack.h" 13 #include "WebInbandTextTrack.h"
15 #include "WebMediaPlayer.h" 14 #include "WebMediaPlayer.h"
16 #include "WebViewImpl.h" 15 #include "WebViewImpl.h"
17 #include "core/html/HTMLMediaElement.h" 16 #include "core/html/HTMLMediaElement.h"
18 #include "core/html/HTMLMediaSource.h" 17 #include "core/html/HTMLMediaSource.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 GraphicsLayer::unregisterContentsLayer(m_videoLayer); 189 GraphicsLayer::unregisterContentsLayer(m_videoLayer);
191 m_videoLayer = layer; 190 m_videoLayer = layer;
192 if (m_videoLayer) { 191 if (m_videoLayer) {
193 m_videoLayer->setOpaque(m_opaque); 192 m_videoLayer->setOpaque(m_opaque);
194 GraphicsLayer::registerContentsLayer(m_videoLayer); 193 GraphicsLayer::registerContentsLayer(m_videoLayer);
195 } 194 }
196 } 195 }
197 196
198 void WebMediaPlayerClientImpl::addTextTrack(WebInbandTextTrack* textTrack) 197 void WebMediaPlayerClientImpl::addTextTrack(WebInbandTextTrack* textTrack)
199 { 198 {
200 m_client->mediaPlayerDidAddTrack(adoptRef(new InbandTextTrackPrivateImpl(tex tTrack))); 199 m_client->mediaPlayerDidAddTrack(textTrack);
201 } 200 }
202 201
203 void WebMediaPlayerClientImpl::removeTextTrack(WebInbandTextTrack* textTrack) 202 void WebMediaPlayerClientImpl::removeTextTrack(WebInbandTextTrack* textTrack)
204 { 203 {
205 // The following static_cast is safe, because we created the object with the textTrack 204 m_client->mediaPlayerDidRemoveTrack(textTrack);
206 // that was passed to addTextTrack. (The object from which we are downcasti ng includes
207 // WebInbandTextTrack as one of the intefaces from which inherits.)
208 m_client->mediaPlayerDidRemoveTrack(static_cast<InbandTextTrackPrivateImpl*> (textTrack->client()));
209 } 205 }
210 206
211 void WebMediaPlayerClientImpl::mediaSourceOpened(WebMediaSource* webMediaSource) 207 void WebMediaPlayerClientImpl::mediaSourceOpened(WebMediaSource* webMediaSource)
212 { 208 {
213 ASSERT(webMediaSource); 209 ASSERT(webMediaSource);
214 m_mediaSource->setPrivateAndOpen(adoptPtr(new MediaSourcePrivateImpl(adoptPt r(webMediaSource)))); 210 m_mediaSource->setPrivateAndOpen(adoptPtr(new MediaSourcePrivateImpl(adoptPt r(webMediaSource))));
215 } 211 }
216 212
217 void WebMediaPlayerClientImpl::requestFullscreen() 213 void WebMediaPlayerClientImpl::requestFullscreen()
218 { 214 {
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 749
754 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate) 750 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate)
755 { 751 {
756 if (m_client) 752 if (m_client)
757 m_client->setFormat(numberOfChannels, sampleRate); 753 m_client->setFormat(numberOfChannels, sampleRate);
758 } 754 }
759 755
760 #endif 756 #endif
761 757
762 } // namespace blink 758 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | Source/web/web.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698