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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 | 808 |
809 if (!webFrame || !webFrame->client()) | 809 if (!webFrame || !webFrame->client()) |
810 return nullptr; | 810 return nullptr; |
811 | 811 |
812 WebMediaSession* webMediaSession = nullptr; | 812 WebMediaSession* webMediaSession = nullptr; |
813 if (MediaSession* mediaSession = HTMLMediaElementMediaSession::session(htmlM
ediaElement)) | 813 if (MediaSession* mediaSession = HTMLMediaElementMediaSession::session(htmlM
ediaElement)) |
814 webMediaSession = mediaSession->getWebMediaSession(); | 814 webMediaSession = mediaSession->getWebMediaSession(); |
815 | 815 |
816 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(htmlMediaElement); | 816 HTMLMediaElementEncryptedMedia& encryptedMedia = HTMLMediaElementEncryptedMe
dia::from(htmlMediaElement); |
817 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)
); | 817 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)
); |
818 return wrapUnique(webFrame->client()->createMediaPlayer(source, | 818 std::unique_ptr<WebMediaPlayer> mediaPlayer = wrapUnique(webFrame->client()-
>createMediaPlayer(source, |
819 client, &encryptedMedia, | 819 client, &encryptedMedia, |
820 encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession)); | 820 encryptedMedia.contentDecryptionModule(), sinkId, webMediaSession)); |
| 821 if (htmlMediaElement.isMediaInFullscreen()) |
| 822 mediaPlayer->updateMediaInFullscreen(true); |
| 823 return mediaPlayer; |
821 } | 824 } |
822 | 825 |
823 std::unique_ptr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() | 826 std::unique_ptr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() |
824 { | 827 { |
825 if (!m_webFrame->client()) | 828 if (!m_webFrame->client()) |
826 return nullptr; | 829 return nullptr; |
827 | 830 |
828 return wrapUnique(m_webFrame->client()->createMediaSession()); | 831 return wrapUnique(m_webFrame->client()->createMediaSession()); |
829 } | 832 } |
830 | 833 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 return m_webFrame->client()->getEffectiveConnectionType(); | 1032 return m_webFrame->client()->getEffectiveConnectionType(); |
1030 return WebEffectiveConnectionType::TypeUnknown; | 1033 return WebEffectiveConnectionType::TypeUnknown; |
1031 } | 1034 } |
1032 | 1035 |
1033 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() | 1036 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() |
1034 { | 1037 { |
1035 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())->
devToolsAgentImpl(); | 1038 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())->
devToolsAgentImpl(); |
1036 } | 1039 } |
1037 | 1040 |
1038 } // namespace blink | 1041 } // namespace blink |
OLD | NEW |