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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 | 786 |
787 if (!webFrame || !webFrame->client()) | 787 if (!webFrame || !webFrame->client()) |
788 return nullptr; | 788 return nullptr; |
789 | 789 |
790 WebMediaSession* webMediaSession = nullptr; | 790 WebMediaSession* webMediaSession = nullptr; |
791 if (MediaSession* mediaSession = HTMLMediaElementMediaSession::session(htmlM
ediaElement)) | 791 if (MediaSession* mediaSession = HTMLMediaElementMediaSession::session(htmlM
ediaElement)) |
792 webMediaSession = mediaSession->getWebMediaSession(); | 792 webMediaSession = mediaSession->getWebMediaSession(); |
793 | 793 |
794 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(htmlMediaElement); | 794 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(htmlMediaElement); |
795 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)
); | 795 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)
); |
796 return wrapUnique(webFrame->client()->createMediaPlayer(source, | 796 std::unique_ptr<WebMediaPlayer> mediaPlayer = wrapUnique(webFrame->client()-
>createMediaPlayer(source, |
797 client, &encryptedMedia, | 797 client, &encryptedMedia, |
798 encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession)); | 798 encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession)); |
| 799 |
| 800 // Check whether video is loaded in fullscreen or its ancestor is full scree
n |
| 801 // element. |
| 802 Element* fullscreenElement = Fullscreen::currentFullScreenElementFrom(htmlMe
diaElement.document()); |
| 803 if (fullscreenElement->contains(&htmlMediaElement)) |
| 804 mediaPlayer->ancestorEnteredFullscreen(); |
| 805 |
| 806 return mediaPlayer; |
799 } | 807 } |
800 | 808 |
801 std::unique_ptr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() | 809 std::unique_ptr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() |
802 { | 810 { |
803 if (!m_webFrame->client()) | 811 if (!m_webFrame->client()) |
804 return nullptr; | 812 return nullptr; |
805 | 813 |
806 return wrapUnique(m_webFrame->client()->createMediaSession()); | 814 return wrapUnique(m_webFrame->client()->createMediaSession()); |
807 } | 815 } |
808 | 816 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 { | 1010 { |
1003 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())->
devToolsAgentImpl(); | 1011 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())->
devToolsAgentImpl(); |
1004 } | 1012 } |
1005 | 1013 |
1006 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) | 1014 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) |
1007 { | 1015 { |
1008 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); | 1016 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); |
1009 } | 1017 } |
1010 | 1018 |
1011 } // namespace blink | 1019 } // namespace blink |
OLD | NEW |