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/MediaSession.h" |
59 #include "modules/serviceworkers/NavigatorServiceWorker.h" | 60 #include "modules/serviceworkers/NavigatorServiceWorker.h" |
60 #include "modules/storage/DOMWindowStorageController.h" | 61 #include "modules/storage/DOMWindowStorageController.h" |
61 #include "modules/vr/NavigatorVRDevice.h" | 62 #include "modules/vr/NavigatorVRDevice.h" |
62 #include "platform/MIMETypeRegistry.h" | 63 #include "platform/MIMETypeRegistry.h" |
63 #include "platform/RuntimeEnabledFeatures.h" | 64 #include "platform/RuntimeEnabledFeatures.h" |
64 #include "platform/UserGestureIndicator.h" | 65 #include "platform/UserGestureIndicator.h" |
65 #include "platform/exported/WrappedResourceRequest.h" | 66 #include "platform/exported/WrappedResourceRequest.h" |
66 #include "platform/exported/WrappedResourceResponse.h" | 67 #include "platform/exported/WrappedResourceResponse.h" |
67 #include "platform/network/HTTPParsers.h" | 68 #include "platform/network/HTTPParsers.h" |
68 #include "platform/plugins/PluginData.h" | 69 #include "platform/plugins/PluginData.h" |
69 #include "public/platform/Platform.h" | 70 #include "public/platform/Platform.h" |
70 #include "public/platform/WebApplicationCacheHost.h" | 71 #include "public/platform/WebApplicationCacheHost.h" |
71 #include "public/platform/WebMimeRegistry.h" | 72 #include "public/platform/WebMimeRegistry.h" |
72 #include "public/platform/WebRTCPeerConnectionHandler.h" | 73 #include "public/platform/WebRTCPeerConnectionHandler.h" |
73 #include "public/platform/WebSecurityOrigin.h" | 74 #include "public/platform/WebSecurityOrigin.h" |
74 #include "public/platform/WebServiceWorkerProvider.h" | 75 #include "public/platform/WebServiceWorkerProvider.h" |
75 #include "public/platform/WebServiceWorkerProviderClient.h" | 76 #include "public/platform/WebServiceWorkerProviderClient.h" |
76 #include "public/platform/WebURL.h" | 77 #include "public/platform/WebURL.h" |
77 #include "public/platform/WebURLError.h" | 78 #include "public/platform/WebURLError.h" |
78 #include "public/platform/WebVector.h" | 79 #include "public/platform/WebVector.h" |
| 80 #include "public/platform/modules/mediasession/WebMediaSession.h" |
79 #include "public/web/WebAutofillClient.h" | 81 #include "public/web/WebAutofillClient.h" |
80 #include "public/web/WebContentSettingsClient.h" | 82 #include "public/web/WebContentSettingsClient.h" |
81 #include "public/web/WebDOMEvent.h" | 83 #include "public/web/WebDOMEvent.h" |
82 #include "public/web/WebDocument.h" | 84 #include "public/web/WebDocument.h" |
83 #include "public/web/WebFormElement.h" | 85 #include "public/web/WebFormElement.h" |
84 #include "public/web/WebFrameClient.h" | 86 #include "public/web/WebFrameClient.h" |
85 #include "public/web/WebNode.h" | 87 #include "public/web/WebNode.h" |
86 #include "public/web/WebPlugin.h" | 88 #include "public/web/WebPlugin.h" |
87 #include "public/web/WebPluginParams.h" | 89 #include "public/web/WebPluginParams.h" |
88 #include "public/web/WebViewClient.h" | 90 #include "public/web/WebViewClient.h" |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 | 763 |
762 if (!webFrame || !webFrame->client()) | 764 if (!webFrame || !webFrame->client()) |
763 return nullptr; | 765 return nullptr; |
764 | 766 |
765 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(htmlMediaElement); | 767 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(htmlMediaElement); |
766 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, | 768 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, |
767 client, &encryptedMedia, | 769 client, &encryptedMedia, |
768 encryptedMedia.contentDecryptionModule())); | 770 encryptedMedia.contentDecryptionModule())); |
769 } | 771 } |
770 | 772 |
| 773 PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() |
| 774 { |
| 775 if (!m_webFrame->client()) |
| 776 return nullptr; |
| 777 |
| 778 return adoptPtr(m_webFrame->client()->createMediaSession(m_webFrame)); |
| 779 } |
| 780 |
771 ObjectContentType FrameLoaderClientImpl::objectContentType( | 781 ObjectContentType FrameLoaderClientImpl::objectContentType( |
772 const KURL& url, | 782 const KURL& url, |
773 const String& explicitMimeType, | 783 const String& explicitMimeType, |
774 bool shouldPreferPlugInsForImages) | 784 bool shouldPreferPlugInsForImages) |
775 { | 785 { |
776 // This code is based on Apple's implementation from | 786 // This code is based on Apple's implementation from |
777 // WebCoreSupport/WebFrameBridge.mm. | 787 // WebCoreSupport/WebFrameBridge.mm. |
778 | 788 |
779 String mimeType = explicitMimeType; | 789 String mimeType = explicitMimeType; |
780 if (mimeType.isEmpty()) { | 790 if (mimeType.isEmpty()) { |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 | 953 |
944 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) | 954 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) |
945 { | 955 { |
946 if (m_webFrame->client()) { | 956 if (m_webFrame->client()) { |
947 m_webFrame->client()->suddenTerminationDisablerChanged( | 957 m_webFrame->client()->suddenTerminationDisablerChanged( |
948 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); | 958 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); |
949 } | 959 } |
950 } | 960 } |
951 | 961 |
952 } // namespace blink | 962 } // namespace blink |
OLD | NEW |