Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 2484973005: [Blink, RemotePlaybackAPI] Create WebRemotePlaybackClient in HTMLMediaElement ctor to avoid lazy in… (Closed)
Patch Set: Fixed compile for EmptyClients.cpp Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 ScriptState* scriptState,
782 HTMLMediaElement& htmlMediaElement) {
783 return HTMLMediaElementRemotePlayback::remote(scriptState, htmlMediaElement);
784 }
785
778 ObjectContentType FrameLoaderClientImpl::getObjectContentType( 786 ObjectContentType FrameLoaderClientImpl::getObjectContentType(
779 const KURL& url, 787 const KURL& url,
780 const String& explicitMimeType, 788 const String& explicitMimeType,
781 bool shouldPreferPlugInsForImages) { 789 bool shouldPreferPlugInsForImages) {
782 // This code is based on Apple's implementation from 790 // This code is based on Apple's implementation from
783 // WebCoreSupport/WebFrameBridge.mm. 791 // WebCoreSupport/WebFrameBridge.mm.
784 792
785 String mimeType = explicitMimeType; 793 String mimeType = explicitMimeType;
786 if (mimeType.isEmpty()) { 794 if (mimeType.isEmpty()) {
787 // Try to guess the MIME type based off the extension. 795 // Try to guess the MIME type based off the extension.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { 982 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() {
975 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) 983 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())
976 ->devToolsAgentImpl(); 984 ->devToolsAgentImpl();
977 } 985 }
978 986
979 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { 987 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) {
980 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); 988 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url));
981 } 989 }
982 990
983 } // namespace blink 991 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698