Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "HTMLMediaElement.h" | 8 #include "HTMLMediaElement.h" |
| 9 #include "InbandTextTrackPrivateImpl.h" | |
| 9 #include "PlatformContextSkia.h" | 10 #include "PlatformContextSkia.h" |
| 10 #include "TimeRanges.h" | 11 #include "TimeRanges.h" |
| 11 #include "WebAudioSourceProvider.h" | 12 #include "WebAudioSourceProvider.h" |
| 12 #include "WebDocument.h" | 13 #include "WebDocument.h" |
| 13 #include "WebFrameClient.h" | 14 #include "WebFrameClient.h" |
| 14 #include "WebFrameImpl.h" | 15 #include "WebFrameImpl.h" |
| 15 #include "WebHelperPluginImpl.h" | 16 #include "WebHelperPluginImpl.h" |
| 17 #include "WebInbandTextTrack.h" | |
| 16 #include "WebMediaPlayer.h" | 18 #include "WebMediaPlayer.h" |
| 17 #include "WebMediaSourceImpl.h" | 19 #include "WebMediaSourceImpl.h" |
| 18 #include "WebViewImpl.h" | 20 #include "WebViewImpl.h" |
| 19 #include "core/page/Frame.h" | 21 #include "core/page/Frame.h" |
| 20 #include "core/platform/KURL.h" | 22 #include "core/platform/KURL.h" |
| 21 #include "core/platform/NotImplemented.h" | 23 #include "core/platform/NotImplemented.h" |
| 22 #include "core/platform/audio/AudioBus.h" | 24 #include "core/platform/audio/AudioBus.h" |
| 23 #include "core/platform/audio/AudioSourceProvider.h" | 25 #include "core/platform/audio/AudioSourceProvider.h" |
| 24 #include "core/platform/audio/AudioSourceProviderClient.h" | 26 #include "core/platform/audio/AudioSourceProviderClient.h" |
| 25 #include "core/platform/chromium/support/GraphicsContext3DPrivate.h" | 27 #include "core/platform/chromium/support/GraphicsContext3DPrivate.h" |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 | 291 |
| 290 if (m_videoLayer) | 292 if (m_videoLayer) |
| 291 GraphicsLayerChromium::unregisterContentsLayer(m_videoLayer); | 293 GraphicsLayerChromium::unregisterContentsLayer(m_videoLayer); |
| 292 m_videoLayer = layer; | 294 m_videoLayer = layer; |
| 293 if (m_videoLayer) { | 295 if (m_videoLayer) { |
| 294 m_videoLayer->setOpaque(m_opaque); | 296 m_videoLayer->setOpaque(m_opaque); |
| 295 GraphicsLayerChromium::registerContentsLayer(m_videoLayer); | 297 GraphicsLayerChromium::registerContentsLayer(m_videoLayer); |
| 296 } | 298 } |
| 297 } | 299 } |
| 298 | 300 |
| 301 void WebMediaPlayerClientImpl::addTextTrack(WebInbandTextTrack* text_track) | |
|
abarth-chromium
2013/04/30 18:36:16
text_track -> textTrack (Blink uses camelCase vari
Matthew Heaney (Chromium)
2013/05/01 04:38:24
Done.
| |
| 302 { | |
| 303 m_mediaPlayer->addTextTrack( | |
| 304 adoptRef(new InbandTextTrackPrivateImpl(text_track))); | |
|
abarth-chromium
2013/04/30 18:36:16
There is no 80 col limit. You can just put these
Matthew Heaney (Chromium)
2013/05/01 04:38:24
Done.
| |
| 305 } | |
| 306 | |
| 307 void WebMediaPlayerClientImpl::removeTextTrack(WebInbandTextTrack* text_track) | |
| 308 { | |
| 309 WebInbandTextTrackClient* const client = text_track->client(); | |
| 310 InbandTextTrackPrivateImpl* const text_track_private = static_cast<InbandTex tTrackPrivateImpl*>(client); | |
|
acolwell GONE FROM CHROMIUM
2013/04/30 18:00:46
nit: Add a comment here similar to the one in HTML
Matthew Heaney (Chromium)
2013/05/01 04:38:24
Done.
| |
| 311 m_mediaPlayer->removeTextTrack(text_track_private); | |
|
abarth-chromium
2013/04/30 18:36:16
camelCase pls
Matthew Heaney (Chromium)
2013/05/01 04:38:24
Done.
| |
| 312 } | |
| 313 | |
| 299 // MediaPlayerPrivateInterface ------------------------------------------------- | 314 // MediaPlayerPrivateInterface ------------------------------------------------- |
| 300 | 315 |
| 301 void WebMediaPlayerClientImpl::load(const String& url) | 316 void WebMediaPlayerClientImpl::load(const String& url) |
| 302 { | 317 { |
| 303 m_url = KURL(ParsedURLString, url); | 318 m_url = KURL(ParsedURLString, url); |
| 304 m_mediaSource = 0; | 319 m_mediaSource = 0; |
| 305 loadRequested(); | 320 loadRequested(); |
| 306 } | 321 } |
| 307 | 322 |
| 308 void WebMediaPlayerClientImpl::load(const String& url, PassRefPtr<WebCore::Media Source> mediaSource) | 323 void WebMediaPlayerClientImpl::load(const String& url, PassRefPtr<WebCore::Media Source> mediaSource) |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 878 | 893 |
| 879 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate) | 894 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate) |
| 880 { | 895 { |
| 881 if (m_client) | 896 if (m_client) |
| 882 m_client->setFormat(numberOfChannels, sampleRate); | 897 m_client->setFormat(numberOfChannels, sampleRate); |
| 883 } | 898 } |
| 884 | 899 |
| 885 #endif | 900 #endif |
| 886 | 901 |
| 887 } // namespace WebKit | 902 } // namespace WebKit |
| OLD | NEW |