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