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

Side by Side 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, 8 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 unified diff | Download patch
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 #if ENABLE(VIDEO) 8 #if ENABLE(VIDEO)
9 9
10 #include "AudioBus.h" 10 #include "AudioBus.h"
11 #include "AudioSourceProvider.h" 11 #include "AudioSourceProvider.h"
12 #include "AudioSourceProviderClient.h" 12 #include "AudioSourceProviderClient.h"
13 #include "Frame.h" 13 #include "Frame.h"
14 #include "GraphicsContext.h" 14 #include "GraphicsContext.h"
15 #include "GraphicsContext3DPrivate.h" 15 #include "GraphicsContext3DPrivate.h"
16 #include "GraphicsLayerChromium.h" 16 #include "GraphicsLayerChromium.h"
17 #include "HTMLMediaElement.h" 17 #include "HTMLMediaElement.h"
18 #include "InbandTextTrackPrivateImpl.h"
18 #include "IntSize.h" 19 #include "IntSize.h"
19 #include "KURL.h" 20 #include "KURL.h"
20 #include "MediaPlayer.h" 21 #include "MediaPlayer.h"
21 #include "NotImplemented.h" 22 #include "NotImplemented.h"
22 #include "PlatformContextSkia.h" 23 #include "PlatformContextSkia.h"
23 #include "RenderLayerCompositor.h" 24 #include "RenderLayerCompositor.h"
24 #include "RenderView.h" 25 #include "RenderView.h"
25 #include "TimeRanges.h" 26 #include "TimeRanges.h"
26 #include "WebAudioSourceProvider.h" 27 #include "WebAudioSourceProvider.h"
27 #include "WebDocument.h" 28 #include "WebDocument.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 292
292 if (m_videoLayer) 293 if (m_videoLayer)
293 GraphicsLayerChromium::unregisterContentsLayer(m_videoLayer); 294 GraphicsLayerChromium::unregisterContentsLayer(m_videoLayer);
294 m_videoLayer = layer; 295 m_videoLayer = layer;
295 if (m_videoLayer) { 296 if (m_videoLayer) {
296 m_videoLayer->setOpaque(m_opaque); 297 m_videoLayer->setOpaque(m_opaque);
297 GraphicsLayerChromium::registerContentsLayer(m_videoLayer); 298 GraphicsLayerChromium::registerContentsLayer(m_videoLayer);
298 } 299 }
299 } 300 }
300 301
302 void WebMediaPlayerClientImpl::addTextTrack(WebInbandTextTrack* text_track)
303 {
304 m_mediaPlayer->addTextTrack(
305 adoptRef(new InbandTextTrackPrivateImpl(text_track)));
306 }
307
308 void WebMediaPlayerClientImpl::removeTextTrack(WebInbandTextTrack* text_track)
309 {
310 m_mediaPlayer->removeTextTrack(
311 adoptRef(new InbandTextTrackPrivateImpl(text_track)));
acolwell GONE FROM CHROMIUM 2013/04/23 06:34:18 This doesn't look right to me. Are you sure this w
Matthew Heaney (Chromium) 2013/04/24 04:32:18 For now I just added a // TODO. I'll take a look
Matthew Heaney (Chromium) 2013/04/27 06:06:28 Done.
312 }
313
301 // MediaPlayerPrivateInterface ------------------------------------------------- 314 // MediaPlayerPrivateInterface -------------------------------------------------
302 315
303 void WebMediaPlayerClientImpl::load(const String& url) 316 void WebMediaPlayerClientImpl::load(const String& url)
304 { 317 {
305 m_url = KURL(ParsedURLString, url); 318 m_url = KURL(ParsedURLString, url);
306 m_mediaSource = 0; 319 m_mediaSource = 0;
307 loadRequested(); 320 loadRequested();
308 } 321 }
309 322
310 void WebMediaPlayerClientImpl::load(const String& url, PassRefPtr<WebCore::Media Source> mediaSource) 323 void WebMediaPlayerClientImpl::load(const String& url, PassRefPtr<WebCore::Media Source> mediaSource)
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 { 895 {
883 if (m_client) 896 if (m_client)
884 m_client->setFormat(numberOfChannels, sampleRate); 897 m_client->setFormat(numberOfChannels, sampleRate);
885 } 898 }
886 899
887 #endif 900 #endif
888 901
889 } // namespace WebKit 902 } // namespace WebKit
890 903
891 #endif // ENABLE(VIDEO) 904 #endif // ENABLE(VIDEO)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698