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 24 matching lines...) Expand all Loading... |
35 #include "bindings/core/v8/ScriptController.h" | 35 #include "bindings/core/v8/ScriptController.h" |
36 #include "core/HTMLNames.h" | 36 #include "core/HTMLNames.h" |
37 #include "core/dom/Document.h" | 37 #include "core/dom/Document.h" |
38 #include "core/dom/Fullscreen.h" | 38 #include "core/dom/Fullscreen.h" |
39 #include "core/events/MessageEvent.h" | 39 #include "core/events/MessageEvent.h" |
40 #include "core/events/MouseEvent.h" | 40 #include "core/events/MouseEvent.h" |
41 #include "core/events/UIEventWithKeyState.h" | 41 #include "core/events/UIEventWithKeyState.h" |
42 #include "core/frame/FrameView.h" | 42 #include "core/frame/FrameView.h" |
43 #include "core/frame/Settings.h" | 43 #include "core/frame/Settings.h" |
44 #include "core/html/HTMLAppletElement.h" | 44 #include "core/html/HTMLAppletElement.h" |
| 45 #include "core/html/HTMLMediaElement.h" |
45 #include "core/layout/HitTestResult.h" | 46 #include "core/layout/HitTestResult.h" |
46 #include "core/loader/DocumentLoader.h" | 47 #include "core/loader/DocumentLoader.h" |
47 #include "core/loader/FrameLoadRequest.h" | 48 #include "core/loader/FrameLoadRequest.h" |
48 #include "core/loader/FrameLoader.h" | 49 #include "core/loader/FrameLoader.h" |
49 #include "core/loader/HistoryItem.h" | 50 #include "core/loader/HistoryItem.h" |
50 #include "core/page/Chrome.h" | 51 #include "core/page/Chrome.h" |
51 #include "core/page/EventHandler.h" | 52 #include "core/page/EventHandler.h" |
52 #include "core/page/Page.h" | 53 #include "core/page/Page.h" |
53 #include "core/page/WindowFeatures.h" | 54 #include "core/page/WindowFeatures.h" |
54 #include "modules/device_light/DeviceLightController.h" | 55 #include "modules/device_light/DeviceLightController.h" |
55 #include "modules/device_orientation/DeviceMotionController.h" | 56 #include "modules/device_orientation/DeviceMotionController.h" |
56 #include "modules/device_orientation/DeviceOrientationController.h" | 57 #include "modules/device_orientation/DeviceOrientationController.h" |
| 58 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" |
57 #include "modules/gamepad/NavigatorGamepad.h" | 59 #include "modules/gamepad/NavigatorGamepad.h" |
58 #include "modules/serviceworkers/NavigatorServiceWorker.h" | 60 #include "modules/serviceworkers/NavigatorServiceWorker.h" |
59 #include "modules/storage/DOMWindowStorageController.h" | 61 #include "modules/storage/DOMWindowStorageController.h" |
60 #include "modules/vr/NavigatorVRDevice.h" | 62 #include "modules/vr/NavigatorVRDevice.h" |
61 #include "platform/MIMETypeRegistry.h" | 63 #include "platform/MIMETypeRegistry.h" |
62 #include "platform/RuntimeEnabledFeatures.h" | 64 #include "platform/RuntimeEnabledFeatures.h" |
63 #include "platform/UserGestureIndicator.h" | 65 #include "platform/UserGestureIndicator.h" |
64 #include "platform/exported/WrappedResourceRequest.h" | 66 #include "platform/exported/WrappedResourceRequest.h" |
65 #include "platform/exported/WrappedResourceResponse.h" | 67 #include "platform/exported/WrappedResourceResponse.h" |
66 #include "platform/network/HTTPParsers.h" | 68 #include "platform/network/HTTPParsers.h" |
67 #include "platform/plugins/PluginData.h" | 69 #include "platform/plugins/PluginData.h" |
68 #include "public/platform/Platform.h" | 70 #include "public/platform/Platform.h" |
69 #include "public/platform/WebApplicationCacheHost.h" | 71 #include "public/platform/WebApplicationCacheHost.h" |
| 72 #include "public/platform/WebMediaPlayer.h" |
70 #include "public/platform/WebMimeRegistry.h" | 73 #include "public/platform/WebMimeRegistry.h" |
71 #include "public/platform/WebRTCPeerConnectionHandler.h" | 74 #include "public/platform/WebRTCPeerConnectionHandler.h" |
72 #include "public/platform/WebSecurityOrigin.h" | 75 #include "public/platform/WebSecurityOrigin.h" |
73 #include "public/platform/WebServiceWorkerProvider.h" | 76 #include "public/platform/WebServiceWorkerProvider.h" |
74 #include "public/platform/WebServiceWorkerProviderClient.h" | 77 #include "public/platform/WebServiceWorkerProviderClient.h" |
75 #include "public/platform/WebURL.h" | 78 #include "public/platform/WebURL.h" |
76 #include "public/platform/WebURLError.h" | 79 #include "public/platform/WebURLError.h" |
77 #include "public/platform/WebVector.h" | 80 #include "public/platform/WebVector.h" |
78 #include "public/web/WebAutofillClient.h" | 81 #include "public/web/WebAutofillClient.h" |
79 #include "public/web/WebCachedURLRequest.h" | 82 #include "public/web/WebCachedURLRequest.h" |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 PassRefPtrWillBeRawPtr<Widget> FrameLoaderClientImpl::createJavaAppletWidget( | 786 PassRefPtrWillBeRawPtr<Widget> FrameLoaderClientImpl::createJavaAppletWidget( |
784 HTMLAppletElement* element, | 787 HTMLAppletElement* element, |
785 const KURL& /* baseURL */, | 788 const KURL& /* baseURL */, |
786 const Vector<String>& paramNames, | 789 const Vector<String>& paramNames, |
787 const Vector<String>& paramValues) | 790 const Vector<String>& paramValues) |
788 { | 791 { |
789 return createPlugin(element, KURL(), paramNames, paramValues, | 792 return createPlugin(element, KURL(), paramNames, paramValues, |
790 "application/x-java-applet", false, FailOnDetachedPlugin); | 793 "application/x-java-applet", false, FailOnDetachedPlugin); |
791 } | 794 } |
792 | 795 |
| 796 PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer( |
| 797 HTMLMediaElement* htmlMediaElement, |
| 798 const WebURL& url) |
| 799 { |
| 800 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame( |
| 801 htmlMediaElement->document().frame()); |
| 802 |
| 803 if (!webFrame || !webFrame->client()) |
| 804 return nullptr; |
| 805 |
| 806 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(*htmlMediaElement); |
| 807 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, |
| 808 static_cast<WebMediaPlayerClient*>(htmlMediaElement), |
| 809 &encryptedMedia, encryptedMedia.contentDecryptionModule(*htmlMediaElemen
t))); |
| 810 } |
| 811 |
793 ObjectContentType FrameLoaderClientImpl::objectContentType( | 812 ObjectContentType FrameLoaderClientImpl::objectContentType( |
794 const KURL& url, | 813 const KURL& url, |
795 const String& explicitMimeType, | 814 const String& explicitMimeType, |
796 bool shouldPreferPlugInsForImages) | 815 bool shouldPreferPlugInsForImages) |
797 { | 816 { |
798 // This code is based on Apple's implementation from | 817 // This code is based on Apple's implementation from |
799 // WebCoreSupport/WebFrameBridge.mm. | 818 // WebCoreSupport/WebFrameBridge.mm. |
800 | 819 |
801 String mimeType = explicitMimeType; | 820 String mimeType = explicitMimeType; |
802 if (mimeType.isEmpty()) { | 821 if (mimeType.isEmpty()) { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 | 985 |
967 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) | 986 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) |
968 { | 987 { |
969 if (m_webFrame->client()) { | 988 if (m_webFrame->client()) { |
970 m_webFrame->client()->suddenTerminationDisablerChanged( | 989 m_webFrame->client()->suddenTerminationDisablerChanged( |
971 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); | 990 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); |
972 } | 991 } |
973 } | 992 } |
974 | 993 |
975 } // namespace blink | 994 } // namespace blink |
OLD | NEW |