| 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 WebMediaPlayerClient* client) { | 766 WebMediaPlayerClient* client) { |
| 767 WebLocalFrameImpl* webFrame = | 767 WebLocalFrameImpl* webFrame = |
| 768 WebLocalFrameImpl::fromFrame(htmlMediaElement.document().frame()); | 768 WebLocalFrameImpl::fromFrame(htmlMediaElement.document().frame()); |
| 769 | 769 |
| 770 if (!webFrame || !webFrame->client()) | 770 if (!webFrame || !webFrame->client()) |
| 771 return nullptr; | 771 return nullptr; |
| 772 | 772 |
| 773 HTMLMediaElementEncryptedMedia& encryptedMedia = | 773 HTMLMediaElementEncryptedMedia& encryptedMedia = |
| 774 HTMLMediaElementEncryptedMedia::from(htmlMediaElement); | 774 HTMLMediaElementEncryptedMedia::from(htmlMediaElement); |
| 775 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); | 775 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); |
| 776 return wrapUnique(webFrame->client()->createMediaPlayer( | 776 std::unique_ptr<WebMediaPlayer> mediaPlayer = |
| 777 source, client, &encryptedMedia, encryptedMedia.contentDecryptionModule(), | 777 wrapUnique(webFrame->client()->createMediaPlayer( |
| 778 sinkId)); | 778 source, client, &encryptedMedia, |
| 779 encryptedMedia.contentDecryptionModule(), sinkId)); |
| 780 float ratio = htmlMediaElement.videoViewportRatio(); |
| 781 if (ratio) |
| 782 mediaPlayer->videoViewportRatioChanged(ratio); |
| 783 return mediaPlayer; |
| 779 } | 784 } |
| 780 | 785 |
| 781 ObjectContentType FrameLoaderClientImpl::getObjectContentType( | 786 ObjectContentType FrameLoaderClientImpl::getObjectContentType( |
| 782 const KURL& url, | 787 const KURL& url, |
| 783 const String& explicitMimeType, | 788 const String& explicitMimeType, |
| 784 bool shouldPreferPlugInsForImages) { | 789 bool shouldPreferPlugInsForImages) { |
| 785 // This code is based on Apple's implementation from | 790 // This code is based on Apple's implementation from |
| 786 // WebCoreSupport/WebFrameBridge.mm. | 791 // WebCoreSupport/WebFrameBridge.mm. |
| 787 | 792 |
| 788 String mimeType = explicitMimeType; | 793 String mimeType = explicitMimeType; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { | 982 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { |
| 978 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) | 983 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) |
| 979 ->devToolsAgentImpl(); | 984 ->devToolsAgentImpl(); |
| 980 } | 985 } |
| 981 | 986 |
| 982 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { | 987 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { |
| 983 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); | 988 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); |
| 984 } | 989 } |
| 985 | 990 |
| 986 } // namespace blink | 991 } // namespace blink |
| OLD | NEW |