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 // Notify WMPI if the video is loaded in fullscreen or its ancestor is full screen element. | |
miu
2016/09/30 08:12:11
Blink coding style generally leans on the side of
xjz
2016/10/01 00:28:41
Done. Removed comments.
| |
796 Element* fullscreenElement = Fullscreen::currentFullScreenElementFrom(htmlMe diaElement.document()); | |
797 if (fullscreenElement->contains(&htmlMediaElement)) | |
798 mediaPlayer->ancestorEnteredFullscreen(); | |
799 | |
800 return mediaPlayer; | |
794 } | 801 } |
795 | 802 |
796 std::unique_ptr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() | 803 std::unique_ptr<WebMediaSession> FrameLoaderClientImpl::createWebMediaSession() |
797 { | 804 { |
798 if (!m_webFrame->client()) | 805 if (!m_webFrame->client()) |
799 return nullptr; | 806 return nullptr; |
800 | 807 |
801 return wrapUnique(m_webFrame->client()->createMediaSession()); | 808 return wrapUnique(m_webFrame->client()->createMediaSession()); |
802 } | 809 } |
803 | 810 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
997 { | 1004 { |
998 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())-> devToolsAgentImpl(); | 1005 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())-> devToolsAgentImpl(); |
999 } | 1006 } |
1000 | 1007 |
1001 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) | 1008 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) |
1002 { | 1009 { |
1003 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); | 1010 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); |
1004 } | 1011 } |
1005 | 1012 |
1006 } // namespace blink | 1013 } // namespace blink |
OLD | NEW |