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