| 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 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 WebMediaPlayerClient* client) { | 780 WebMediaPlayerClient* client) { |
| 781 WebLocalFrameImpl* webFrame = | 781 WebLocalFrameImpl* webFrame = |
| 782 WebLocalFrameImpl::fromFrame(htmlMediaElement.document().frame()); | 782 WebLocalFrameImpl::fromFrame(htmlMediaElement.document().frame()); |
| 783 | 783 |
| 784 if (!webFrame || !webFrame->client()) | 784 if (!webFrame || !webFrame->client()) |
| 785 return nullptr; | 785 return nullptr; |
| 786 | 786 |
| 787 HTMLMediaElementEncryptedMedia& encryptedMedia = | 787 HTMLMediaElementEncryptedMedia& encryptedMedia = |
| 788 HTMLMediaElementEncryptedMedia::from(htmlMediaElement); | 788 HTMLMediaElementEncryptedMedia::from(htmlMediaElement); |
| 789 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); | 789 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); |
| 790 return wrapUnique(webFrame->client()->createMediaPlayer( | 790 std::unique_ptr<WebMediaPlayer> mediaPlayer = |
| 791 source, client, &encryptedMedia, encryptedMedia.contentDecryptionModule(), | 791 wrapUnique(webFrame->client()->createMediaPlayer( |
| 792 sinkId)); | 792 source, client, &encryptedMedia, |
| 793 encryptedMedia.contentDecryptionModule(), sinkId)); |
| 794 |
| 795 Element* fullscreenElement = |
| 796 Fullscreen::currentFullScreenElementFrom(htmlMediaElement.document()); |
| 797 if (fullscreenElement->contains(&htmlMediaElement)) |
| 798 mediaPlayer->ancestorEnteredFullscreen(); |
| 799 |
| 800 return mediaPlayer; |
| 793 } | 801 } |
| 794 | 802 |
| 795 std::unique_ptr<WebMediaSession> | 803 std::unique_ptr<WebMediaSession> |
| 796 FrameLoaderClientImpl::createWebMediaSession() { | 804 FrameLoaderClientImpl::createWebMediaSession() { |
| 797 if (!m_webFrame->client()) | 805 if (!m_webFrame->client()) |
| 798 return nullptr; | 806 return nullptr; |
| 799 | 807 |
| 800 return wrapUnique(m_webFrame->client()->createMediaSession()); | 808 return wrapUnique(m_webFrame->client()->createMediaSession()); |
| 801 } | 809 } |
| 802 | 810 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { | 1007 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { |
| 1000 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) | 1008 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) |
| 1001 ->devToolsAgentImpl(); | 1009 ->devToolsAgentImpl(); |
| 1002 } | 1010 } |
| 1003 | 1011 |
| 1004 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { | 1012 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { |
| 1005 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); | 1013 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); |
| 1006 } | 1014 } |
| 1007 | 1015 |
| 1008 } // namespace blink | 1016 } // namespace blink |
| OLD | NEW |