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

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

Issue 655603003: Reland: Remove "needkey" event and add its replacement, "encrypted". (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | public/platform/WebMediaPlayerClient.h » ('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 "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"
15 #include "modules/mediastream/MediaStreamRegistry.h" 14 #include "modules/mediastream/MediaStreamRegistry.h"
16 #include "platform/audio/AudioBus.h" 15 #include "platform/audio/AudioBus.h"
17 #include "platform/audio/AudioSourceProviderClient.h" 16 #include "platform/audio/AudioSourceProviderClient.h"
18 #include "platform/geometry/IntSize.h" 17 #include "platform/geometry/IntSize.h"
19 #include "platform/graphics/GraphicsContext.h" 18 #include "platform/graphics/GraphicsContext.h"
20 #include "platform/graphics/GraphicsLayer.h" 19 #include "platform/graphics/GraphicsLayer.h"
21 #include "platform/graphics/gpu/Extensions3DUtil.h" 20 #include "platform/graphics/gpu/Extensions3DUtil.h"
22 #include "platform/graphics/skia/GaneshUtils.h" 21 #include "platform/graphics/skia/GaneshUtils.h"
23 #include "public/platform/Platform.h" 22 #include "public/platform/Platform.h"
24 #include "public/platform/WebAudioSourceProvider.h" 23 #include "public/platform/WebAudioSourceProvider.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 HTMLMediaElementEncryptedMedia::keyError(mediaElement(), keySystem, sessionI d, errorCode, systemCode); 118 HTMLMediaElementEncryptedMedia::keyError(mediaElement(), keySystem, sessionI d, errorCode, systemCode);
120 } 119 }
121 120
122 void WebMediaPlayerClientImpl::keyMessage(const WebString& keySystem, const WebS tring& sessionId, const unsigned char* message, unsigned messageLength, const We bURL& defaultURL) 121 void WebMediaPlayerClientImpl::keyMessage(const WebString& keySystem, const WebS tring& sessionId, const unsigned char* message, unsigned messageLength, const We bURL& defaultURL)
123 { 122 {
124 HTMLMediaElementEncryptedMedia::keyMessage(mediaElement(), keySystem, sessio nId, message, messageLength, defaultURL); 123 HTMLMediaElementEncryptedMedia::keyMessage(mediaElement(), keySystem, sessio nId, message, messageLength, defaultURL);
125 } 124 }
126 125
127 void WebMediaPlayerClientImpl::keyNeeded(const WebString& contentType, const uns igned char* initData, unsigned initDataLength) 126 void WebMediaPlayerClientImpl::keyNeeded(const WebString& contentType, const uns igned char* initData, unsigned initDataLength)
128 { 127 {
129 HTMLMediaElementEncryptedMedia::keyNeeded(mediaElement(), contentType, initD ata, initDataLength); 128 HTMLMediaElementEncryptedMedia::encrypted(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);
130 } 134 }
131 135
132 void WebMediaPlayerClientImpl::setWebLayer(WebLayer* layer) 136 void WebMediaPlayerClientImpl::setWebLayer(WebLayer* layer)
133 { 137 {
134 m_client->mediaPlayerSetWebLayer(layer); 138 m_client->mediaPlayerSetWebLayer(layer);
135 } 139 }
136 140
137 WebMediaPlayer::TrackId WebMediaPlayerClientImpl::addAudioTrack(const WebString& id, AudioTrackKind kind, const WebString& label, const WebString& language, boo l enabled) 141 WebMediaPlayer::TrackId WebMediaPlayerClientImpl::addAudioTrack(const WebString& id, AudioTrackKind kind, const WebString& label, const WebString& language, boo l enabled)
138 { 142 {
139 return mediaElement().addAudioTrack(id, kind, label, language, enabled); 143 return mediaElement().addAudioTrack(id, kind, label, language, enabled);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 309 }
306 310
307 void WebMediaPlayerClientImpl::AudioClientImpl::trace(Visitor* visitor) 311 void WebMediaPlayerClientImpl::AudioClientImpl::trace(Visitor* visitor)
308 { 312 {
309 visitor->trace(m_client); 313 visitor->trace(m_client);
310 } 314 }
311 315
312 #endif 316 #endif
313 317
314 } // namespace blink 318 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebMediaPlayerClientImpl.h ('k') | public/platform/WebMediaPlayerClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698