| 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 "web/WebMediaPlayerClientImpl.h" | 6 #include "web/WebMediaPlayerClientImpl.h" |
| 7 | 7 |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "core/html/HTMLMediaElement.h" | 9 #include "core/html/HTMLMediaElement.h" |
| 10 #include "core/html/TimeRanges.h" | 10 #include "core/html/TimeRanges.h" |
| 11 #include "core/rendering/RenderView.h" | 11 #include "core/rendering/RenderView.h" |
| 12 #include "core/rendering/compositing/RenderLayerCompositor.h" | 12 #include "core/rendering/compositing/RenderLayerCompositor.h" |
| 13 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" | 13 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" |
| 14 #include "modules/encryptedmedia/MediaKeyNeededEvent.h" |
| 14 #include "modules/mediastream/MediaStreamRegistry.h" | 15 #include "modules/mediastream/MediaStreamRegistry.h" |
| 15 #include "platform/audio/AudioBus.h" | 16 #include "platform/audio/AudioBus.h" |
| 16 #include "platform/audio/AudioSourceProviderClient.h" | 17 #include "platform/audio/AudioSourceProviderClient.h" |
| 17 #include "platform/geometry/IntSize.h" | 18 #include "platform/geometry/IntSize.h" |
| 18 #include "platform/graphics/GraphicsContext.h" | 19 #include "platform/graphics/GraphicsContext.h" |
| 19 #include "platform/graphics/GraphicsLayer.h" | 20 #include "platform/graphics/GraphicsLayer.h" |
| 20 #include "platform/graphics/gpu/Extensions3DUtil.h" | 21 #include "platform/graphics/gpu/Extensions3DUtil.h" |
| 21 #include "platform/graphics/skia/GaneshUtils.h" | 22 #include "platform/graphics/skia/GaneshUtils.h" |
| 22 #include "public/platform/Platform.h" | 23 #include "public/platform/Platform.h" |
| 23 #include "public/platform/WebAudioSourceProvider.h" | 24 #include "public/platform/WebAudioSourceProvider.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 HTMLMediaElementEncryptedMedia::keyError(mediaElement(), keySystem, sessionI
d, errorCode, systemCode); | 119 HTMLMediaElementEncryptedMedia::keyError(mediaElement(), keySystem, sessionI
d, errorCode, systemCode); |
| 119 } | 120 } |
| 120 | 121 |
| 121 void WebMediaPlayerClientImpl::keyMessage(const WebString& keySystem, const WebS
tring& sessionId, const unsigned char* message, unsigned messageLength, const We
bURL& defaultURL) | 122 void WebMediaPlayerClientImpl::keyMessage(const WebString& keySystem, const WebS
tring& sessionId, const unsigned char* message, unsigned messageLength, const We
bURL& defaultURL) |
| 122 { | 123 { |
| 123 HTMLMediaElementEncryptedMedia::keyMessage(mediaElement(), keySystem, sessio
nId, message, messageLength, defaultURL); | 124 HTMLMediaElementEncryptedMedia::keyMessage(mediaElement(), keySystem, sessio
nId, message, messageLength, defaultURL); |
| 124 } | 125 } |
| 125 | 126 |
| 126 void WebMediaPlayerClientImpl::keyNeeded(const WebString& contentType, const uns
igned char* initData, unsigned initDataLength) | 127 void WebMediaPlayerClientImpl::keyNeeded(const WebString& contentType, const uns
igned char* initData, unsigned initDataLength) |
| 127 { | 128 { |
| 128 HTMLMediaElementEncryptedMedia::encrypted(mediaElement(), contentType, initD
ata, initDataLength); | 129 HTMLMediaElementEncryptedMedia::keyNeeded(mediaElement(), contentType, initD
ata, initDataLength); |
| 129 } | |
| 130 | |
| 131 void WebMediaPlayerClientImpl::encrypted(const WebString& initDataType, const un
signed char* initData, unsigned initDataLength) | |
| 132 { | |
| 133 HTMLMediaElementEncryptedMedia::encrypted(mediaElement(), initDataType, init
Data, initDataLength); | |
| 134 } | 130 } |
| 135 | 131 |
| 136 void WebMediaPlayerClientImpl::setWebLayer(WebLayer* layer) | 132 void WebMediaPlayerClientImpl::setWebLayer(WebLayer* layer) |
| 137 { | 133 { |
| 138 m_client->mediaPlayerSetWebLayer(layer); | 134 m_client->mediaPlayerSetWebLayer(layer); |
| 139 } | 135 } |
| 140 | 136 |
| 141 WebMediaPlayer::TrackId WebMediaPlayerClientImpl::addAudioTrack(const WebString&
id, AudioTrackKind kind, const WebString& label, const WebString& language, boo
l enabled) | 137 WebMediaPlayer::TrackId WebMediaPlayerClientImpl::addAudioTrack(const WebString&
id, AudioTrackKind kind, const WebString& label, const WebString& language, boo
l enabled) |
| 142 { | 138 { |
| 143 return mediaElement().addAudioTrack(id, kind, label, language, enabled); | 139 return mediaElement().addAudioTrack(id, kind, label, language, enabled); |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 } | 305 } |
| 310 | 306 |
| 311 void WebMediaPlayerClientImpl::AudioClientImpl::trace(Visitor* visitor) | 307 void WebMediaPlayerClientImpl::AudioClientImpl::trace(Visitor* visitor) |
| 312 { | 308 { |
| 313 visitor->trace(m_client); | 309 visitor->trace(m_client); |
| 314 } | 310 } |
| 315 | 311 |
| 316 #endif | 312 #endif |
| 317 | 313 |
| 318 } // namespace blink | 314 } // namespace blink |
| OLD | NEW |