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

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

Issue 1825763002: media: Enable Unified Media Pipeline for MSE and EME on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #include "platform/MIMETypeRegistry.h" 67 #include "platform/MIMETypeRegistry.h"
68 #include "platform/RuntimeEnabledFeatures.h" 68 #include "platform/RuntimeEnabledFeatures.h"
69 #include "platform/UserGestureIndicator.h" 69 #include "platform/UserGestureIndicator.h"
70 #include "platform/exported/WrappedResourceRequest.h" 70 #include "platform/exported/WrappedResourceRequest.h"
71 #include "platform/exported/WrappedResourceResponse.h" 71 #include "platform/exported/WrappedResourceResponse.h"
72 #include "platform/fonts/GlyphPageTreeNode.h" 72 #include "platform/fonts/GlyphPageTreeNode.h"
73 #include "platform/network/HTTPParsers.h" 73 #include "platform/network/HTTPParsers.h"
74 #include "platform/plugins/PluginData.h" 74 #include "platform/plugins/PluginData.h"
75 #include "public/platform/Platform.h" 75 #include "public/platform/Platform.h"
76 #include "public/platform/WebApplicationCacheHost.h" 76 #include "public/platform/WebApplicationCacheHost.h"
77 #include "public/platform/WebMediaPlayer.h"
78 #include "public/platform/WebMimeRegistry.h" 77 #include "public/platform/WebMimeRegistry.h"
79 #include "public/platform/WebRTCPeerConnectionHandler.h" 78 #include "public/platform/WebRTCPeerConnectionHandler.h"
80 #include "public/platform/WebSecurityOrigin.h" 79 #include "public/platform/WebSecurityOrigin.h"
81 #include "public/platform/WebURL.h" 80 #include "public/platform/WebURL.h"
82 #include "public/platform/WebURLError.h" 81 #include "public/platform/WebURLError.h"
83 #include "public/platform/WebVector.h" 82 #include "public/platform/WebVector.h"
84 #include "public/platform/modules/mediasession/WebMediaSession.h" 83 #include "public/platform/modules/mediasession/WebMediaSession.h"
85 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" 84 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h"
86 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h " 85 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h "
87 #include "public/web/WebAutofillClient.h" 86 #include "public/web/WebAutofillClient.h"
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 return nullptr; 812 return nullptr;
814 813
815 if (policy != AllowDetachedPlugin && !element->layoutObject()) 814 if (policy != AllowDetachedPlugin && !element->layoutObject())
816 return nullptr; 815 return nullptr;
817 816
818 return container; 817 return container;
819 } 818 }
820 819
821 PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer( 820 PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer(
822 HTMLMediaElement& htmlMediaElement, 821 HTMLMediaElement& htmlMediaElement,
823 WebMediaPlayer::LoadType loadType,
824 const WebURL& url, 822 const WebURL& url,
825 WebMediaPlayerClient* client) 823 WebMediaPlayerClient* client)
826 { 824 {
827 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame( 825 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(
828 htmlMediaElement.document().frame()); 826 htmlMediaElement.document().frame());
829 827
830 if (!webFrame || !webFrame->client()) 828 if (!webFrame || !webFrame->client())
831 return nullptr; 829 return nullptr;
832 830
833 WebMediaSession* webMediaSession = nullptr; 831 WebMediaSession* webMediaSession = nullptr;
834 if (MediaSession* mediaSession = HTMLMediaElementMediaSession::session(htmlM ediaElement)) 832 if (MediaSession* mediaSession = HTMLMediaElementMediaSession::session(htmlM ediaElement))
835 webMediaSession = mediaSession->getWebMediaSession(); 833 webMediaSession = mediaSession->getWebMediaSession();
836 834
837 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe dia::from(htmlMediaElement); 835 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe dia::from(htmlMediaElement);
838 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement) ); 836 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement) );
839 return adoptPtr(webFrame->client()->createMediaPlayer(loadType, url, 837 return adoptPtr(webFrame->client()->createMediaPlayer(url, client, &encrypte dMedia,
840 client, &encryptedMedia,
841 encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession)); 838 encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession));
842 } 839 }
843 840
844 PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() 841 PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession()
845 { 842 {
846 if (!m_webFrame->client()) 843 if (!m_webFrame->client())
847 return nullptr; 844 return nullptr;
848 845
849 return adoptPtr(m_webFrame->client()->createMediaSession()); 846 return adoptPtr(m_webFrame->client()->createMediaSession());
850 } 847 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 1042
1046 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) 1043 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type)
1047 { 1044 {
1048 if (m_webFrame->client()) { 1045 if (m_webFrame->client()) {
1049 m_webFrame->client()->suddenTerminationDisablerChanged( 1046 m_webFrame->client()->suddenTerminationDisablerChanged(
1050 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 1047 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
1051 } 1048 }
1052 } 1049 }
1053 1050
1054 } // namespace blink 1051 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/FrameLoaderClientImpl.h ('k') | third_party/WebKit/public/web/WebFrameClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698