| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 #include "core/loader/FrameLoadRequest.h" | 49 #include "core/loader/FrameLoadRequest.h" |
| 50 #include "core/loader/FrameLoader.h" | 50 #include "core/loader/FrameLoader.h" |
| 51 #include "core/loader/HistoryItem.h" | 51 #include "core/loader/HistoryItem.h" |
| 52 #include "core/page/Page.h" | 52 #include "core/page/Page.h" |
| 53 #include "core/page/WindowFeatures.h" | 53 #include "core/page/WindowFeatures.h" |
| 54 #include "modules/device_light/DeviceLightController.h" | 54 #include "modules/device_light/DeviceLightController.h" |
| 55 #include "modules/device_orientation/DeviceMotionController.h" | 55 #include "modules/device_orientation/DeviceMotionController.h" |
| 56 #include "modules/device_orientation/DeviceOrientationController.h" | 56 #include "modules/device_orientation/DeviceOrientationController.h" |
| 57 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" | 57 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" |
| 58 #include "modules/gamepad/NavigatorGamepad.h" | 58 #include "modules/gamepad/NavigatorGamepad.h" |
| 59 #include "modules/mediasession/HTMLMediaElementMediaSession.h" |
| 60 #include "modules/mediasession/MediaSession.h" |
| 59 #include "modules/serviceworkers/NavigatorServiceWorker.h" | 61 #include "modules/serviceworkers/NavigatorServiceWorker.h" |
| 60 #include "modules/storage/DOMWindowStorageController.h" | 62 #include "modules/storage/DOMWindowStorageController.h" |
| 61 #include "modules/vr/NavigatorVRDevice.h" | 63 #include "modules/vr/NavigatorVRDevice.h" |
| 62 #include "platform/MIMETypeRegistry.h" | 64 #include "platform/MIMETypeRegistry.h" |
| 63 #include "platform/RuntimeEnabledFeatures.h" | 65 #include "platform/RuntimeEnabledFeatures.h" |
| 64 #include "platform/UserGestureIndicator.h" | 66 #include "platform/UserGestureIndicator.h" |
| 65 #include "platform/exported/WrappedResourceRequest.h" | 67 #include "platform/exported/WrappedResourceRequest.h" |
| 66 #include "platform/exported/WrappedResourceResponse.h" | 68 #include "platform/exported/WrappedResourceResponse.h" |
| 67 #include "platform/network/HTTPParsers.h" | 69 #include "platform/network/HTTPParsers.h" |
| 68 #include "platform/plugins/PluginData.h" | 70 #include "platform/plugins/PluginData.h" |
| 69 #include "public/platform/Platform.h" | 71 #include "public/platform/Platform.h" |
| 70 #include "public/platform/WebApplicationCacheHost.h" | 72 #include "public/platform/WebApplicationCacheHost.h" |
| 71 #include "public/platform/WebMimeRegistry.h" | 73 #include "public/platform/WebMimeRegistry.h" |
| 72 #include "public/platform/WebRTCPeerConnectionHandler.h" | 74 #include "public/platform/WebRTCPeerConnectionHandler.h" |
| 73 #include "public/platform/WebSecurityOrigin.h" | 75 #include "public/platform/WebSecurityOrigin.h" |
| 74 #include "public/platform/WebServiceWorkerProvider.h" | 76 #include "public/platform/WebServiceWorkerProvider.h" |
| 75 #include "public/platform/WebServiceWorkerProviderClient.h" | 77 #include "public/platform/WebServiceWorkerProviderClient.h" |
| 76 #include "public/platform/WebURL.h" | 78 #include "public/platform/WebURL.h" |
| 77 #include "public/platform/WebURLError.h" | 79 #include "public/platform/WebURLError.h" |
| 78 #include "public/platform/WebVector.h" | 80 #include "public/platform/WebVector.h" |
| 81 #include "public/platform/modules/mediasession/WebMediaSession.h" |
| 79 #include "public/web/WebAutofillClient.h" | 82 #include "public/web/WebAutofillClient.h" |
| 80 #include "public/web/WebContentSettingsClient.h" | 83 #include "public/web/WebContentSettingsClient.h" |
| 81 #include "public/web/WebDOMEvent.h" | 84 #include "public/web/WebDOMEvent.h" |
| 82 #include "public/web/WebDocument.h" | 85 #include "public/web/WebDocument.h" |
| 83 #include "public/web/WebFormElement.h" | 86 #include "public/web/WebFormElement.h" |
| 84 #include "public/web/WebFrameClient.h" | 87 #include "public/web/WebFrameClient.h" |
| 85 #include "public/web/WebNode.h" | 88 #include "public/web/WebNode.h" |
| 86 #include "public/web/WebPlugin.h" | 89 #include "public/web/WebPlugin.h" |
| 87 #include "public/web/WebPluginParams.h" | 90 #include "public/web/WebPluginParams.h" |
| 88 #include "public/web/WebViewClient.h" | 91 #include "public/web/WebViewClient.h" |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 HTMLMediaElement& htmlMediaElement, | 755 HTMLMediaElement& htmlMediaElement, |
| 753 const WebURL& url, | 756 const WebURL& url, |
| 754 WebMediaPlayerClient* client) | 757 WebMediaPlayerClient* client) |
| 755 { | 758 { |
| 756 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame( | 759 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame( |
| 757 htmlMediaElement.document().frame()); | 760 htmlMediaElement.document().frame()); |
| 758 | 761 |
| 759 if (!webFrame || !webFrame->client()) | 762 if (!webFrame || !webFrame->client()) |
| 760 return nullptr; | 763 return nullptr; |
| 761 | 764 |
| 765 WebMediaSession* webMediaSession = 0; |
| 766 if (MediaSession* session = HTMLMediaElementMediaSession::session(htmlMediaE
lement)) |
| 767 webMediaSession = session->webMediaSession(); |
| 768 |
| 762 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(htmlMediaElement); | 769 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(htmlMediaElement); |
| 763 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, | 770 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, |
| 764 client, &encryptedMedia, | 771 client, &encryptedMedia, |
| 765 encryptedMedia.contentDecryptionModule())); | 772 encryptedMedia.contentDecryptionModule(), webMediaSession)); |
| 773 } |
| 774 |
| 775 PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() |
| 776 { |
| 777 if (!m_webFrame->client()) |
| 778 return nullptr; |
| 779 |
| 780 return adoptPtr(m_webFrame->client()->createMediaSession(m_webFrame)); |
| 766 } | 781 } |
| 767 | 782 |
| 768 ObjectContentType FrameLoaderClientImpl::objectContentType( | 783 ObjectContentType FrameLoaderClientImpl::objectContentType( |
| 769 const KURL& url, | 784 const KURL& url, |
| 770 const String& explicitMimeType, | 785 const String& explicitMimeType, |
| 771 bool shouldPreferPlugInsForImages) | 786 bool shouldPreferPlugInsForImages) |
| 772 { | 787 { |
| 773 // This code is based on Apple's implementation from | 788 // This code is based on Apple's implementation from |
| 774 // WebCoreSupport/WebFrameBridge.mm. | 789 // WebCoreSupport/WebFrameBridge.mm. |
| 775 | 790 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 | 955 |
| 941 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) | 956 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) |
| 942 { | 957 { |
| 943 if (m_webFrame->client()) { | 958 if (m_webFrame->client()) { |
| 944 m_webFrame->client()->suddenTerminationDisablerChanged( | 959 m_webFrame->client()->suddenTerminationDisablerChanged( |
| 945 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); | 960 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); |
| 946 } | 961 } |
| 947 } | 962 } |
| 948 | 963 |
| 949 } // namespace blink | 964 } // namespace blink |
| OLD | NEW |