| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #include "core/origin_trials/OriginTrials.h" | 52 #include "core/origin_trials/OriginTrials.h" |
| 53 #include "core/page/Page.h" | 53 #include "core/page/Page.h" |
| 54 #include "core/page/WindowFeatures.h" | 54 #include "core/page/WindowFeatures.h" |
| 55 #include "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h" | 55 #include "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h" |
| 56 #include "modules/device_light/DeviceLightController.h" | 56 #include "modules/device_light/DeviceLightController.h" |
| 57 #include "modules/device_orientation/DeviceMotionController.h" | 57 #include "modules/device_orientation/DeviceMotionController.h" |
| 58 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h" | 58 #include "modules/device_orientation/DeviceOrientationAbsoluteController.h" |
| 59 #include "modules/device_orientation/DeviceOrientationController.h" | 59 #include "modules/device_orientation/DeviceOrientationController.h" |
| 60 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" | 60 #include "modules/encryptedmedia/HTMLMediaElementEncryptedMedia.h" |
| 61 #include "modules/gamepad/NavigatorGamepad.h" | 61 #include "modules/gamepad/NavigatorGamepad.h" |
| 62 #include "modules/remoteplayback/HTMLMediaElementRemotePlayback.h" |
| 63 #include "modules/remoteplayback/RemotePlayback.h" |
| 62 #include "modules/serviceworkers/NavigatorServiceWorker.h" | 64 #include "modules/serviceworkers/NavigatorServiceWorker.h" |
| 63 #include "modules/serviceworkers/ServiceWorkerLinkResource.h" | 65 #include "modules/serviceworkers/ServiceWorkerLinkResource.h" |
| 64 #include "modules/storage/DOMWindowStorageController.h" | 66 #include "modules/storage/DOMWindowStorageController.h" |
| 65 #include "modules/vr/NavigatorVR.h" | 67 #include "modules/vr/NavigatorVR.h" |
| 66 #include "platform/Histogram.h" | 68 #include "platform/Histogram.h" |
| 67 #include "platform/MIMETypeRegistry.h" | 69 #include "platform/MIMETypeRegistry.h" |
| 68 #include "platform/RuntimeEnabledFeatures.h" | 70 #include "platform/RuntimeEnabledFeatures.h" |
| 69 #include "platform/UserGestureIndicator.h" | 71 #include "platform/UserGestureIndicator.h" |
| 70 #include "platform/exported/WrappedResourceRequest.h" | 72 #include "platform/exported/WrappedResourceRequest.h" |
| 71 #include "platform/exported/WrappedResourceResponse.h" | 73 #include "platform/exported/WrappedResourceResponse.h" |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 return nullptr; | 770 return nullptr; |
| 769 | 771 |
| 770 HTMLMediaElementEncryptedMedia& encryptedMedia = | 772 HTMLMediaElementEncryptedMedia& encryptedMedia = |
| 771 HTMLMediaElementEncryptedMedia::from(htmlMediaElement); | 773 HTMLMediaElementEncryptedMedia::from(htmlMediaElement); |
| 772 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); | 774 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); |
| 773 return wrapUnique(webFrame->client()->createMediaPlayer( | 775 return wrapUnique(webFrame->client()->createMediaPlayer( |
| 774 source, client, &encryptedMedia, encryptedMedia.contentDecryptionModule(), | 776 source, client, &encryptedMedia, encryptedMedia.contentDecryptionModule(), |
| 775 sinkId)); | 777 sinkId)); |
| 776 } | 778 } |
| 777 | 779 |
| 780 WebRemotePlaybackClient* FrameLoaderClientImpl::createWebRemotePlaybackClient( |
| 781 HTMLMediaElement& htmlMediaElement) { |
| 782 return HTMLMediaElementRemotePlayback::remote(htmlMediaElement); |
| 783 } |
| 784 |
| 778 ObjectContentType FrameLoaderClientImpl::getObjectContentType( | 785 ObjectContentType FrameLoaderClientImpl::getObjectContentType( |
| 779 const KURL& url, | 786 const KURL& url, |
| 780 const String& explicitMimeType, | 787 const String& explicitMimeType, |
| 781 bool shouldPreferPlugInsForImages) { | 788 bool shouldPreferPlugInsForImages) { |
| 782 // This code is based on Apple's implementation from | 789 // This code is based on Apple's implementation from |
| 783 // WebCoreSupport/WebFrameBridge.mm. | 790 // WebCoreSupport/WebFrameBridge.mm. |
| 784 | 791 |
| 785 String mimeType = explicitMimeType; | 792 String mimeType = explicitMimeType; |
| 786 if (mimeType.isEmpty()) { | 793 if (mimeType.isEmpty()) { |
| 787 // Try to guess the MIME type based off the extension. | 794 // Try to guess the MIME type based off the extension. |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { | 981 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { |
| 975 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) | 982 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) |
| 976 ->devToolsAgentImpl(); | 983 ->devToolsAgentImpl(); |
| 977 } | 984 } |
| 978 | 985 |
| 979 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { | 986 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { |
| 980 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); | 987 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); |
| 981 } | 988 } |
| 982 | 989 |
| 983 } // namespace blink | 990 } // namespace blink |
| OLD | NEW |