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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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/audio_output_devices/HTMLMediaElementAudioOutputDevice.h" | 54 #include "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h" |
55 #include "modules/device_light/DeviceLightController.h" | 55 #include "modules/device_light/DeviceLightController.h" |
56 #include "modules/device_orientation/DeviceMotionController.h" | 56 #include "modules/device_orientation/DeviceMotionController.h" |
57 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h" | 57 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h" |
58 #include "modules/device_orientation/DeviceOrientationController.h" | 58 #include "modules/device_orientation/DeviceOrientationController.h" |
59 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" | 59 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" |
60 #include "modules/gamepad/NavigatorGamepad.h" | 60 #include "modules/gamepad/NavigatorGamepad.h" |
61 #include "modules/mediasession/MediaSession.h" | |
62 #include "modules/serviceworkers/NavigatorServiceWorker.h" | 61 #include "modules/serviceworkers/NavigatorServiceWorker.h" |
63 #include "modules/serviceworkers/ServiceWorkerLinkResource.h" | 62 #include "modules/serviceworkers/ServiceWorkerLinkResource.h" |
64 #include "modules/storage/DOMWindowStorageController.h" | 63 #include "modules/storage/DOMWindowStorageController.h" |
65 #include "modules/vr/NavigatorVR.h" | 64 #include "modules/vr/NavigatorVR.h" |
66 #include "platform/Histogram.h" | 65 #include "platform/Histogram.h" |
67 #include "platform/MIMETypeRegistry.h" | 66 #include "platform/MIMETypeRegistry.h" |
68 #include "platform/RuntimeEnabledFeatures.h" | 67 #include "platform/RuntimeEnabledFeatures.h" |
69 #include "platform/UserGestureIndicator.h" | 68 #include "platform/UserGestureIndicator.h" |
70 #include "platform/exported/WrappedResourceRequest.h" | 69 #include "platform/exported/WrappedResourceRequest.h" |
71 #include "platform/exported/WrappedResourceResponse.h" | 70 #include "platform/exported/WrappedResourceResponse.h" |
72 #include "platform/fonts/GlyphPageTreeNode.h" | 71 #include "platform/fonts/GlyphPageTreeNode.h" |
73 #include "platform/network/HTTPParsers.h" | 72 #include "platform/network/HTTPParsers.h" |
74 #include "platform/plugins/PluginData.h" | 73 #include "platform/plugins/PluginData.h" |
75 #include "public/platform/Platform.h" | 74 #include "public/platform/Platform.h" |
76 #include "public/platform/WebApplicationCacheHost.h" | 75 #include "public/platform/WebApplicationCacheHost.h" |
77 #include "public/platform/WebMediaPlayerSource.h" | 76 #include "public/platform/WebMediaPlayerSource.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" | |
85 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" | 83 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" |
86 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
" | 84 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
" |
87 #include "public/web/WebAutofillClient.h" | 85 #include "public/web/WebAutofillClient.h" |
88 #include "public/web/WebContentSettingsClient.h" | 86 #include "public/web/WebContentSettingsClient.h" |
89 #include "public/web/WebDOMEvent.h" | 87 #include "public/web/WebDOMEvent.h" |
90 #include "public/web/WebDocument.h" | 88 #include "public/web/WebDocument.h" |
91 #include "public/web/WebFormElement.h" | 89 #include "public/web/WebFormElement.h" |
92 #include "public/web/WebFrameClient.h" | 90 #include "public/web/WebFrameClient.h" |
93 #include "public/web/WebNode.h" | 91 #include "public/web/WebNode.h" |
94 #include "public/web/WebPlugin.h" | 92 #include "public/web/WebPlugin.h" |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 return nullptr; | 783 return nullptr; |
786 | 784 |
787 HTMLMediaElementEncryptedMedia& encryptedMedia = | 785 HTMLMediaElementEncryptedMedia& encryptedMedia = |
788 HTMLMediaElementEncryptedMedia::from(htmlMediaElement); | 786 HTMLMediaElementEncryptedMedia::from(htmlMediaElement); |
789 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); | 787 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); |
790 return wrapUnique(webFrame->client()->createMediaPlayer( | 788 return wrapUnique(webFrame->client()->createMediaPlayer( |
791 source, client, &encryptedMedia, encryptedMedia.contentDecryptionModule(), | 789 source, client, &encryptedMedia, encryptedMedia.contentDecryptionModule(), |
792 sinkId)); | 790 sinkId)); |
793 } | 791 } |
794 | 792 |
795 std::unique_ptr<WebMediaSession> | |
796 FrameLoaderClientImpl::createWebMediaSession() { | |
797 if (!m_webFrame->client()) | |
798 return nullptr; | |
799 | |
800 return wrapUnique(m_webFrame->client()->createMediaSession()); | |
801 } | |
802 | |
803 ObjectContentType FrameLoaderClientImpl::getObjectContentType( | 793 ObjectContentType FrameLoaderClientImpl::getObjectContentType( |
804 const KURL& url, | 794 const KURL& url, |
805 const String& explicitMimeType, | 795 const String& explicitMimeType, |
806 bool shouldPreferPlugInsForImages) { | 796 bool shouldPreferPlugInsForImages) { |
807 // This code is based on Apple's implementation from | 797 // This code is based on Apple's implementation from |
808 // WebCoreSupport/WebFrameBridge.mm. | 798 // WebCoreSupport/WebFrameBridge.mm. |
809 | 799 |
810 String mimeType = explicitMimeType; | 800 String mimeType = explicitMimeType; |
811 if (mimeType.isEmpty()) { | 801 if (mimeType.isEmpty()) { |
812 // Try to guess the MIME type based off the extension. | 802 // Try to guess the MIME type based off the extension. |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { | 989 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { |
1000 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) | 990 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) |
1001 ->devToolsAgentImpl(); | 991 ->devToolsAgentImpl(); |
1002 } | 992 } |
1003 | 993 |
1004 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { | 994 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { |
1005 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); | 995 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); |
1006 } | 996 } |
1007 | 997 |
1008 } // namespace blink | 998 } // namespace blink |
OLD | NEW |