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

Side by Side Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 1815033003: Add srcObject attribute of type MediaStream to HTMLMediaElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android compile issue Created 4 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 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "platform/MIMETypeRegistry.h" 68 #include "platform/MIMETypeRegistry.h"
69 #include "platform/RuntimeEnabledFeatures.h" 69 #include "platform/RuntimeEnabledFeatures.h"
70 #include "platform/UserGestureIndicator.h" 70 #include "platform/UserGestureIndicator.h"
71 #include "platform/exported/WrappedResourceRequest.h" 71 #include "platform/exported/WrappedResourceRequest.h"
72 #include "platform/exported/WrappedResourceResponse.h" 72 #include "platform/exported/WrappedResourceResponse.h"
73 #include "platform/fonts/GlyphPageTreeNode.h" 73 #include "platform/fonts/GlyphPageTreeNode.h"
74 #include "platform/network/HTTPParsers.h" 74 #include "platform/network/HTTPParsers.h"
75 #include "platform/plugins/PluginData.h" 75 #include "platform/plugins/PluginData.h"
76 #include "public/platform/Platform.h" 76 #include "public/platform/Platform.h"
77 #include "public/platform/WebApplicationCacheHost.h" 77 #include "public/platform/WebApplicationCacheHost.h"
78 #include "public/platform/WebMediaElementSource.h"
78 #include "public/platform/WebMediaPlayer.h" 79 #include "public/platform/WebMediaPlayer.h"
79 #include "public/platform/WebMimeRegistry.h" 80 #include "public/platform/WebMimeRegistry.h"
80 #include "public/platform/WebRTCPeerConnectionHandler.h" 81 #include "public/platform/WebRTCPeerConnectionHandler.h"
81 #include "public/platform/WebSecurityOrigin.h" 82 #include "public/platform/WebSecurityOrigin.h"
82 #include "public/platform/WebURL.h" 83 #include "public/platform/WebURL.h"
83 #include "public/platform/WebURLError.h" 84 #include "public/platform/WebURLError.h"
84 #include "public/platform/WebVector.h" 85 #include "public/platform/WebVector.h"
85 #include "public/platform/modules/mediasession/WebMediaSession.h" 86 #include "public/platform/modules/mediasession/WebMediaSession.h"
86 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" 87 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h"
87 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h " 88 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h "
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 816
816 if (policy != AllowDetachedPlugin && !element->layoutObject()) 817 if (policy != AllowDetachedPlugin && !element->layoutObject())
817 return nullptr; 818 return nullptr;
818 819
819 return container; 820 return container;
820 } 821 }
821 822
822 PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer( 823 PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer(
823 HTMLMediaElement& htmlMediaElement, 824 HTMLMediaElement& htmlMediaElement,
824 WebMediaPlayer::LoadType loadType, 825 WebMediaPlayer::LoadType loadType,
825 const WebURL& url, 826 const WebMediaElementSource& source,
826 WebMediaPlayerClient* client) 827 WebMediaPlayerClient* client)
827 { 828 {
828 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame( 829 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(
829 htmlMediaElement.document().frame()); 830 htmlMediaElement.document().frame());
830 831
831 if (!webFrame || !webFrame->client()) 832 if (!webFrame || !webFrame->client())
832 return nullptr; 833 return nullptr;
833 834
834 WebMediaSession* webMediaSession = nullptr; 835 WebMediaSession* webMediaSession = nullptr;
835 if (MediaSession* mediaSession = HTMLMediaElementMediaSession::session(htmlM ediaElement)) 836 if (MediaSession* mediaSession = HTMLMediaElementMediaSession::session(htmlM ediaElement))
836 webMediaSession = mediaSession->getWebMediaSession(); 837 webMediaSession = mediaSession->getWebMediaSession();
837 838
838 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe dia::from(htmlMediaElement); 839 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe dia::from(htmlMediaElement);
839 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement) ); 840 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement) );
840 return adoptPtr(webFrame->client()->createMediaPlayer(loadType, url, 841 return adoptPtr(webFrame->client()->createMediaPlayer(loadType, source,
841 client, &encryptedMedia, 842 client, &encryptedMedia,
842 encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession)); 843 encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession));
843 } 844 }
844 845
845 PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() 846 PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession()
846 { 847 {
847 if (!m_webFrame->client()) 848 if (!m_webFrame->client())
848 return nullptr; 849 return nullptr;
849 850
850 return adoptPtr(m_webFrame->client()->createMediaSession()); 851 return adoptPtr(m_webFrame->client()->createMediaSession());
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 1052 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
1052 } 1053 }
1053 } 1054 }
1054 1055
1055 PassOwnPtrWillBeRawPtr<LinkResource> FrameLoaderClientImpl::createServiceWorkerL inkResource(HTMLLinkElement* owner) 1056 PassOwnPtrWillBeRawPtr<LinkResource> FrameLoaderClientImpl::createServiceWorkerL inkResource(HTMLLinkElement* owner)
1056 { 1057 {
1057 return ServiceWorkerLinkResource::create(owner); 1058 return ServiceWorkerLinkResource::create(owner);
1058 } 1059 }
1059 1060
1060 } // namespace blink 1061 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698