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

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

Issue 1259643002: NOT FOR LANDING Introduce and use WebMediaSession (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: hack until something works Created 5 years, 4 months 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 | Annotate | Revision Log
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "modules/vr/NavigatorVRDevice.h" 61 #include "modules/vr/NavigatorVRDevice.h"
62 #include "platform/MIMETypeRegistry.h" 62 #include "platform/MIMETypeRegistry.h"
63 #include "platform/RuntimeEnabledFeatures.h" 63 #include "platform/RuntimeEnabledFeatures.h"
64 #include "platform/UserGestureIndicator.h" 64 #include "platform/UserGestureIndicator.h"
65 #include "platform/exported/WrappedResourceRequest.h" 65 #include "platform/exported/WrappedResourceRequest.h"
66 #include "platform/exported/WrappedResourceResponse.h" 66 #include "platform/exported/WrappedResourceResponse.h"
67 #include "platform/network/HTTPParsers.h" 67 #include "platform/network/HTTPParsers.h"
68 #include "platform/plugins/PluginData.h" 68 #include "platform/plugins/PluginData.h"
69 #include "public/platform/Platform.h" 69 #include "public/platform/Platform.h"
70 #include "public/platform/WebApplicationCacheHost.h" 70 #include "public/platform/WebApplicationCacheHost.h"
71 #include "public/platform/WebMediaSession.h"
71 #include "public/platform/WebMimeRegistry.h" 72 #include "public/platform/WebMimeRegistry.h"
72 #include "public/platform/WebRTCPeerConnectionHandler.h" 73 #include "public/platform/WebRTCPeerConnectionHandler.h"
73 #include "public/platform/WebSecurityOrigin.h" 74 #include "public/platform/WebSecurityOrigin.h"
74 #include "public/platform/WebServiceWorkerProvider.h" 75 #include "public/platform/WebServiceWorkerProvider.h"
75 #include "public/platform/WebServiceWorkerProviderClient.h" 76 #include "public/platform/WebServiceWorkerProviderClient.h"
76 #include "public/platform/WebURL.h" 77 #include "public/platform/WebURL.h"
77 #include "public/platform/WebURLError.h" 78 #include "public/platform/WebURLError.h"
78 #include "public/platform/WebVector.h" 79 #include "public/platform/WebVector.h"
79 #include "public/web/WebAutofillClient.h" 80 #include "public/web/WebAutofillClient.h"
80 #include "public/web/WebCachedURLRequest.h" 81 #include "public/web/WebCachedURLRequest.h"
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 790
790 if (!webFrame || !webFrame->client()) 791 if (!webFrame || !webFrame->client())
791 return nullptr; 792 return nullptr;
792 793
793 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe dia::from(htmlMediaElement); 794 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe dia::from(htmlMediaElement);
794 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url, 795 return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, url,
795 client, &encryptedMedia, 796 client, &encryptedMedia,
796 encryptedMedia.contentDecryptionModule())); 797 encryptedMedia.contentDecryptionModule()));
797 } 798 }
798 799
800 PassOwnPtr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession()
801 {
802 if (!m_webFrame->client())
803 return nullptr;
804
805 return adoptPtr(m_webFrame->client()->createMediaSession(m_webFrame));
806 }
807
799 ObjectContentType FrameLoaderClientImpl::objectContentType( 808 ObjectContentType FrameLoaderClientImpl::objectContentType(
800 const KURL& url, 809 const KURL& url,
801 const String& explicitMimeType, 810 const String& explicitMimeType,
802 bool shouldPreferPlugInsForImages) 811 bool shouldPreferPlugInsForImages)
803 { 812 {
804 // This code is based on Apple's implementation from 813 // This code is based on Apple's implementation from
805 // WebCoreSupport/WebFrameBridge.mm. 814 // WebCoreSupport/WebFrameBridge.mm.
806 815
807 String mimeType = explicitMimeType; 816 String mimeType = explicitMimeType;
808 if (mimeType.isEmpty()) { 817 if (mimeType.isEmpty()) {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 980
972 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) 981 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type)
973 { 982 {
974 if (m_webFrame->client()) { 983 if (m_webFrame->client()) {
975 m_webFrame->client()->suddenTerminationDisablerChanged( 984 m_webFrame->client()->suddenTerminationDisablerChanged(
976 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 985 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
977 } 986 }
978 } 987 }
979 988
980 } // namespace blink 989 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698