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" | |
60 #include "modules/serviceworkers/NavigatorServiceWorker.h" | 59 #include "modules/serviceworkers/NavigatorServiceWorker.h" |
61 #include "modules/storage/DOMWindowStorageController.h" | 60 #include "modules/storage/DOMWindowStorageController.h" |
62 #include "modules/vr/NavigatorVRDevice.h" | 61 #include "modules/vr/NavigatorVRDevice.h" |
63 #include "platform/MIMETypeRegistry.h" | 62 #include "platform/MIMETypeRegistry.h" |
64 #include "platform/RuntimeEnabledFeatures.h" | 63 #include "platform/RuntimeEnabledFeatures.h" |
65 #include "platform/UserGestureIndicator.h" | 64 #include "platform/UserGestureIndicator.h" |
66 #include "platform/exported/WrappedResourceRequest.h" | 65 #include "platform/exported/WrappedResourceRequest.h" |
67 #include "platform/exported/WrappedResourceResponse.h" | 66 #include "platform/exported/WrappedResourceResponse.h" |
68 #include "platform/network/HTTPParsers.h" | 67 #include "platform/network/HTTPParsers.h" |
69 #include "platform/plugins/PluginData.h" | 68 #include "platform/plugins/PluginData.h" |
70 #include "public/platform/Platform.h" | 69 #include "public/platform/Platform.h" |
71 #include "public/platform/WebApplicationCacheHost.h" | 70 #include "public/platform/WebApplicationCacheHost.h" |
72 #include "public/platform/WebMimeRegistry.h" | 71 #include "public/platform/WebMimeRegistry.h" |
73 #include "public/platform/WebRTCPeerConnectionHandler.h" | 72 #include "public/platform/WebRTCPeerConnectionHandler.h" |
74 #include "public/platform/WebSecurityOrigin.h" | 73 #include "public/platform/WebSecurityOrigin.h" |
75 #include "public/platform/WebURL.h" | 74 #include "public/platform/WebURL.h" |
76 #include "public/platform/WebURLError.h" | 75 #include "public/platform/WebURLError.h" |
77 #include "public/platform/WebVector.h" | 76 #include "public/platform/WebVector.h" |
78 #include "public/platform/modules/mediasession/WebMediaSession.h" | |
79 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" | 77 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" |
80 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
" | 78 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
" |
81 #include "public/web/WebAutofillClient.h" | 79 #include "public/web/WebAutofillClient.h" |
82 #include "public/web/WebContentSettingsClient.h" | 80 #include "public/web/WebContentSettingsClient.h" |
83 #include "public/web/WebDOMEvent.h" | 81 #include "public/web/WebDOMEvent.h" |
84 #include "public/web/WebDocument.h" | 82 #include "public/web/WebDocument.h" |
85 #include "public/web/WebFormElement.h" | 83 #include "public/web/WebFormElement.h" |
86 #include "public/web/WebFrameClient.h" | 84 #include "public/web/WebFrameClient.h" |
87 #include "public/web/WebNode.h" | 85 #include "public/web/WebNode.h" |
88 #include "public/web/WebPlugin.h" | 86 #include "public/web/WebPlugin.h" |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 | 774 |
777 if (!webFrame || !webFrame->client()) | 775 if (!webFrame || !webFrame->client()) |
778 return nullptr; | 776 return nullptr; |
779 | 777 |
780 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(htmlMediaElement); | 778 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(htmlMediaElement); |
781 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, | 779 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, |
782 client, &encryptedMedia, | 780 client, &encryptedMedia, |
783 encryptedMedia.contentDecryptionModule())); | 781 encryptedMedia.contentDecryptionModule())); |
784 } | 782 } |
785 | 783 |
786 PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() | |
787 { | |
788 if (!m_webFrame->client()) | |
789 return nullptr; | |
790 | |
791 return adoptPtr(m_webFrame->client()->createMediaSession()); | |
792 } | |
793 | |
794 ObjectContentType FrameLoaderClientImpl::objectContentType( | 784 ObjectContentType FrameLoaderClientImpl::objectContentType( |
795 const KURL& url, | 785 const KURL& url, |
796 const String& explicitMimeType, | 786 const String& explicitMimeType, |
797 bool shouldPreferPlugInsForImages) | 787 bool shouldPreferPlugInsForImages) |
798 { | 788 { |
799 // This code is based on Apple's implementation from | 789 // This code is based on Apple's implementation from |
800 // WebCoreSupport/WebFrameBridge.mm. | 790 // WebCoreSupport/WebFrameBridge.mm. |
801 | 791 |
802 String mimeType = explicitMimeType; | 792 String mimeType = explicitMimeType; |
803 if (mimeType.isEmpty()) { | 793 if (mimeType.isEmpty()) { |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 | 956 |
967 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) | 957 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) |
968 { | 958 { |
969 if (m_webFrame->client()) { | 959 if (m_webFrame->client()) { |
970 m_webFrame->client()->suddenTerminationDisablerChanged( | 960 m_webFrame->client()->suddenTerminationDisablerChanged( |
971 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); | 961 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); |
972 } | 962 } |
973 } | 963 } |
974 | 964 |
975 } // namespace blink | 965 } // namespace blink |
OLD | NEW |