Chromium Code Reviews

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

Issue 170233009: Initial implementation of AudioTrack, AudioTrackList, VideoTrack, and VideoTrackList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@blink-master
Patch Set: Rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 "WebDocument.h" 8 #include "WebDocument.h"
9 #include "WebFrameClient.h" 9 #include "WebFrameClient.h"
10 #include "WebFrameImpl.h" 10 #include "WebFrameImpl.h"
(...skipping 133 matching lines...)
144 void WebMediaPlayerClientImpl::keyNeeded(const WebString& contentType, const uns igned char* initData, unsigned initDataLength) 144 void WebMediaPlayerClientImpl::keyNeeded(const WebString& contentType, const uns igned char* initData, unsigned initDataLength)
145 { 145 {
146 HTMLMediaElementEncryptedMedia::keyNeeded(mediaElement(), contentType, initD ata, initDataLength); 146 HTMLMediaElementEncryptedMedia::keyNeeded(mediaElement(), contentType, initD ata, initDataLength);
147 } 147 }
148 148
149 void WebMediaPlayerClientImpl::setWebLayer(blink::WebLayer* layer) 149 void WebMediaPlayerClientImpl::setWebLayer(blink::WebLayer* layer)
150 { 150 {
151 m_client->mediaPlayerSetWebLayer(layer); 151 m_client->mediaPlayerSetWebLayer(layer);
152 } 152 }
153 153
154 void WebMediaPlayerClientImpl::addVideoTrack(const WebString& id, VideoTrackKind kind, const WebString& label, const WebString& language, bool selected)
155 {
156 mediaElement().addVideoTrack(id, kind, label, language, selected);
157 }
158
159 void WebMediaPlayerClientImpl::removeVideoTrack(const WebString& id)
160 {
161 mediaElement().removeVideoTrack(id);
162 }
163
164 void WebMediaPlayerClientImpl::addAudioTrack(const WebString& id, AudioTrackKind kind, const WebString& label, const WebString& language, bool enabled)
165 {
166 mediaElement().addAudioTrack(id, kind, label, language, enabled);
167 }
168
169 void WebMediaPlayerClientImpl::removeAudioTrack(const WebString& id)
170 {
171 mediaElement().removeAudioTrack(id);
172 }
173
154 void WebMediaPlayerClientImpl::addTextTrack(WebInbandTextTrack* textTrack) 174 void WebMediaPlayerClientImpl::addTextTrack(WebInbandTextTrack* textTrack)
155 { 175 {
156 m_client->mediaPlayerDidAddTextTrack(textTrack); 176 m_client->mediaPlayerDidAddTextTrack(textTrack);
157 } 177 }
158 178
159 void WebMediaPlayerClientImpl::removeTextTrack(WebInbandTextTrack* textTrack) 179 void WebMediaPlayerClientImpl::removeTextTrack(WebInbandTextTrack* textTrack)
160 { 180 {
161 m_client->mediaPlayerDidRemoveTextTrack(textTrack); 181 m_client->mediaPlayerDidRemoveTextTrack(textTrack);
162 } 182 }
163 183
(...skipping 456 matching lines...)
620 640
621 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate) 641 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate)
622 { 642 {
623 if (m_client) 643 if (m_client)
624 m_client->setFormat(numberOfChannels, sampleRate); 644 m_client->setFormat(numberOfChannels, sampleRate);
625 } 645 }
626 646
627 #endif 647 #endif
628 648
629 } // namespace blink 649 } // namespace blink
OLDNEW

Powered by Google App Engine