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

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: Addressed IDL comments. Created 6 years, 9 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 #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...) Expand 10 before | Expand all | Expand 10 after
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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 579
560 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate) 580 void WebMediaPlayerClientImpl::AudioClientImpl::setFormat(size_t numberOfChannel s, float sampleRate)
561 { 581 {
562 if (m_client) 582 if (m_client)
563 m_client->setFormat(numberOfChannels, sampleRate); 583 m_client->setFormat(numberOfChannels, sampleRate);
564 } 584 }
565 585
566 #endif 586 #endif
567 587
568 } // namespace blink 588 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698