| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |