Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(462)

Side by Side Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 2389473002: Media Remoting: Add RemotingController. (Closed)
Patch Set: Rebased. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 WebMediaPlayerClient* client) { 778 WebMediaPlayerClient* client) {
779 WebLocalFrameImpl* webFrame = 779 WebLocalFrameImpl* webFrame =
780 WebLocalFrameImpl::fromFrame(htmlMediaElement.document().frame()); 780 WebLocalFrameImpl::fromFrame(htmlMediaElement.document().frame());
781 781
782 if (!webFrame || !webFrame->client()) 782 if (!webFrame || !webFrame->client())
783 return nullptr; 783 return nullptr;
784 784
785 HTMLMediaElementEncryptedMedia& encryptedMedia = 785 HTMLMediaElementEncryptedMedia& encryptedMedia =
786 HTMLMediaElementEncryptedMedia::from(htmlMediaElement); 786 HTMLMediaElementEncryptedMedia::from(htmlMediaElement);
787 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); 787 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement));
788 return wrapUnique(webFrame->client()->createMediaPlayer( 788 std::unique_ptr<WebMediaPlayer> mediaPlayer =
789 source, client, &encryptedMedia, encryptedMedia.contentDecryptionModule(), 789 wrapUnique(webFrame->client()->createMediaPlayer(
790 sinkId)); 790 source, client, &encryptedMedia,
791 encryptedMedia.contentDecryptionModule(), sinkId));
792
793 Element* fullscreenElement =
794 Fullscreen::currentFullScreenElementFrom(htmlMediaElement.document());
795 if (fullscreenElement->contains(&htmlMediaElement))
esprehn 2016/10/08 03:33:04 This doesn't understand shadow dom, also what if t
xjz 2016/10/10 19:31:02 Removed this from this CL. As commented, will open
796 mediaPlayer->ancestorEnteredFullscreen();
797
798 return mediaPlayer;
791 } 799 }
792 800
793 ObjectContentType FrameLoaderClientImpl::getObjectContentType( 801 ObjectContentType FrameLoaderClientImpl::getObjectContentType(
794 const KURL& url, 802 const KURL& url,
795 const String& explicitMimeType, 803 const String& explicitMimeType,
796 bool shouldPreferPlugInsForImages) { 804 bool shouldPreferPlugInsForImages) {
797 // This code is based on Apple's implementation from 805 // This code is based on Apple's implementation from
798 // WebCoreSupport/WebFrameBridge.mm. 806 // WebCoreSupport/WebFrameBridge.mm.
799 807
800 String mimeType = explicitMimeType; 808 String mimeType = explicitMimeType;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { 997 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() {
990 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) 998 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())
991 ->devToolsAgentImpl(); 999 ->devToolsAgentImpl();
992 } 1000 }
993 1001
994 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { 1002 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) {
995 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); 1003 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url));
996 } 1004 }
997 1005
998 } // namespace blink 1006 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698