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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 PassRefPtrWillBeRawPtr<Widget> FrameLoaderClientImpl::createJavaAppletWidget( | 775 PassRefPtrWillBeRawPtr<Widget> FrameLoaderClientImpl::createJavaAppletWidget( |
773 HTMLAppletElement* element, | 776 HTMLAppletElement* element, |
774 const KURL& /* baseURL */, | 777 const KURL& /* baseURL */, |
775 const Vector<String>& paramNames, | 778 const Vector<String>& paramNames, |
776 const Vector<String>& paramValues) | 779 const Vector<String>& paramValues) |
777 { | 780 { |
778 return createPlugin(element, KURL(), paramNames, paramValues, | 781 return createPlugin(element, KURL(), paramNames, paramValues, |
779 "application/x-java-applet", false, FailOnDetachedPlugin); | 782 "application/x-java-applet", false, FailOnDetachedPlugin); |
780 } | 783 } |
781 | 784 |
| 785 PassOwnPtr<WebMediaPlayer> FrameLoaderClientImpl::createWebMediaPlayer( |
| 786 HTMLMediaElement* htmlMediaElement, |
| 787 const WebURL& url) |
| 788 { |
| 789 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame( |
| 790 htmlMediaElement->document().frame()); |
| 791 |
| 792 if (!webFrame || !webFrame->client()) |
| 793 return nullptr; |
| 794 |
| 795 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(*htmlMediaElement); |
| 796 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, |
| 797 static_cast<WebMediaPlayerClient*>(htmlMediaElement), |
| 798 &encryptedMedia, encryptedMedia.contentDecryptionModule())); |
| 799 } |
| 800 |
782 ObjectContentType FrameLoaderClientImpl::objectContentType( | 801 ObjectContentType FrameLoaderClientImpl::objectContentType( |
783 const KURL& url, | 802 const KURL& url, |
784 const String& explicitMimeType, | 803 const String& explicitMimeType, |
785 bool shouldPreferPlugInsForImages) | 804 bool shouldPreferPlugInsForImages) |
786 { | 805 { |
787 // This code is based on Apple's implementation from | 806 // This code is based on Apple's implementation from |
788 // WebCoreSupport/WebFrameBridge.mm. | 807 // WebCoreSupport/WebFrameBridge.mm. |
789 | 808 |
790 String mimeType = explicitMimeType; | 809 String mimeType = explicitMimeType; |
791 if (mimeType.isEmpty()) { | 810 if (mimeType.isEmpty()) { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 | 974 |
956 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) | 975 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) |
957 { | 976 { |
958 if (m_webFrame->client()) { | 977 if (m_webFrame->client()) { |
959 m_webFrame->client()->suddenTerminationDisablerChanged( | 978 m_webFrame->client()->suddenTerminationDisablerChanged( |
960 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); | 979 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); |
961 } | 980 } |
962 } | 981 } |
963 | 982 |
964 } // namespace blink | 983 } // namespace blink |
OLD | NEW |