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

Side by Side Diff: Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp

Issue 10536097: Merge 119742 - Plumb CORS attribute information from HTMLMediaElement to media players so it can be… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 6 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/WebKit/chromium/src/WebMediaPlayerClientImpl.h ('k') | no next file » | 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 "WebMediaPlayerClientImpl.h" 6 #include "WebMediaPlayerClientImpl.h"
7 7
8 #if ENABLE(VIDEO) 8 #if ENABLE(VIDEO)
9 9
10 #include "AudioSourceProvider.h" 10 #include "AudioSourceProvider.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider. 294 m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider.
295 #endif 295 #endif
296 296
297 Frame* frame = static_cast<HTMLMediaElement*>(m_mediaPlayer->mediaPlayerClie nt())->document()->frame(); 297 Frame* frame = static_cast<HTMLMediaElement*>(m_mediaPlayer->mediaPlayerClie nt())->document()->frame();
298 m_webMediaPlayer = createWebMediaPlayer(this, frame); 298 m_webMediaPlayer = createWebMediaPlayer(this, frame);
299 if (m_webMediaPlayer) { 299 if (m_webMediaPlayer) {
300 #if ENABLE(WEB_AUDIO) 300 #if ENABLE(WEB_AUDIO)
301 // Make sure if we create/re-create the WebMediaPlayer that we update ou r wrapper. 301 // Make sure if we create/re-create the WebMediaPlayer that we update ou r wrapper.
302 m_audioSourceProvider.wrap(m_webMediaPlayer->audioSourceProvider()); 302 m_audioSourceProvider.wrap(m_webMediaPlayer->audioSourceProvider());
303 #endif 303 #endif
304 m_webMediaPlayer->load(KURL(ParsedURLString, m_url)); 304 m_webMediaPlayer->load(
305 KURL(ParsedURLString, m_url),
306 static_cast<WebMediaPlayer::CORSMode>(m_mediaPlayer->mediaPlayerClie nt()->mediaPlayerCORSMode()));
305 } 307 }
306 } 308 }
307 309
308 void WebMediaPlayerClientImpl::cancelLoad() 310 void WebMediaPlayerClientImpl::cancelLoad()
309 { 311 {
310 if (m_webMediaPlayer) 312 if (m_webMediaPlayer)
311 m_webMediaPlayer->cancelLoad(); 313 m_webMediaPlayer->cancelLoad();
312 } 314 }
313 315
314 #if USE(ACCELERATED_COMPOSITING) 316 #if USE(ACCELERATED_COMPOSITING)
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 startDelayedLoad(); 618 startDelayedLoad();
617 } 619 }
618 620
619 bool WebMediaPlayerClientImpl::hasSingleSecurityOrigin() const 621 bool WebMediaPlayerClientImpl::hasSingleSecurityOrigin() const
620 { 622 {
621 if (m_webMediaPlayer) 623 if (m_webMediaPlayer)
622 return m_webMediaPlayer->hasSingleSecurityOrigin(); 624 return m_webMediaPlayer->hasSingleSecurityOrigin();
623 return false; 625 return false;
624 } 626 }
625 627
628 bool WebMediaPlayerClientImpl::didPassCORSAccessCheck() const
629 {
630 if (m_webMediaPlayer)
631 return m_webMediaPlayer->didPassCORSAccessCheck();
632 return false;
633 }
634
626 MediaPlayer::MovieLoadType WebMediaPlayerClientImpl::movieLoadType() const 635 MediaPlayer::MovieLoadType WebMediaPlayerClientImpl::movieLoadType() const
627 { 636 {
628 if (m_webMediaPlayer) 637 if (m_webMediaPlayer)
629 return static_cast<MediaPlayer::MovieLoadType>( 638 return static_cast<MediaPlayer::MovieLoadType>(
630 m_webMediaPlayer->movieLoadType()); 639 m_webMediaPlayer->movieLoadType());
631 return MediaPlayer::Unknown; 640 return MediaPlayer::Unknown;
632 } 641 }
633 642
634 float WebMediaPlayerClientImpl::mediaTimeForTimeValue(float timeValue) const 643 float WebMediaPlayerClientImpl::mediaTimeForTimeValue(float timeValue) const
635 { 644 {
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 { 854 {
846 if (m_client) 855 if (m_client)
847 m_client->setFormat(numberOfChannels, sampleRate); 856 m_client->setFormat(numberOfChannels, sampleRate);
848 } 857 }
849 858
850 #endif 859 #endif
851 860
852 } // namespace WebKit 861 } // namespace WebKit
853 862
854 #endif // ENABLE(VIDEO) 863 #endif // ENABLE(VIDEO)
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698