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

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

Issue 2511143006: Detect change on the intersection of video and viewport. (Closed)
Patch Set: Created 4 years, 1 month 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 WebMediaPlayerClient* client) { 768 WebMediaPlayerClient* client) {
769 WebLocalFrameImpl* webFrame = 769 WebLocalFrameImpl* webFrame =
770 WebLocalFrameImpl::fromFrame(htmlMediaElement.document().frame()); 770 WebLocalFrameImpl::fromFrame(htmlMediaElement.document().frame());
771 771
772 if (!webFrame || !webFrame->client()) 772 if (!webFrame || !webFrame->client())
773 return nullptr; 773 return nullptr;
774 774
775 HTMLMediaElementEncryptedMedia& encryptedMedia = 775 HTMLMediaElementEncryptedMedia& encryptedMedia =
776 HTMLMediaElementEncryptedMedia::from(htmlMediaElement); 776 HTMLMediaElementEncryptedMedia::from(htmlMediaElement);
777 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement)); 777 WebString sinkId(HTMLMediaElementAudioOutputDevice::sinkId(htmlMediaElement));
778 return wrapUnique(webFrame->client()->createMediaPlayer( 778
779 source, client, &encryptedMedia, encryptedMedia.contentDecryptionModule(), 779 std::unique_ptr<WebMediaPlayer> mediaPlayer =
780 sinkId)); 780 wrapUnique(webFrame->client()->createMediaPlayer(
781 source, client, &encryptedMedia,
782 encryptedMedia.contentDecryptionModule(), sinkId));
783 WebMediaPlayer::ViewportIntersectionInfo intersectInfo =
miu 2016/11/21 21:07:04 It seems that this should be unconditional. Just:
xjz 2016/11/21 23:58:42 Done.
784 htmlMediaElement.currentViewportIntersection();
785 if (!intersectInfo.intersectRect.isEmpty())
786 mediaPlayer->videoViewportIntersectionChanged(intersectInfo);
787 return mediaPlayer;
781 } 788 }
782 789
783 WebRemotePlaybackClient* FrameLoaderClientImpl::createWebRemotePlaybackClient( 790 WebRemotePlaybackClient* FrameLoaderClientImpl::createWebRemotePlaybackClient(
784 HTMLMediaElement& htmlMediaElement) { 791 HTMLMediaElement& htmlMediaElement) {
785 return HTMLMediaElementRemotePlayback::remote(htmlMediaElement); 792 return HTMLMediaElementRemotePlayback::remote(htmlMediaElement);
786 } 793 }
787 794
788 ObjectContentType FrameLoaderClientImpl::getObjectContentType( 795 ObjectContentType FrameLoaderClientImpl::getObjectContentType(
789 const KURL& url, 796 const KURL& url,
790 const String& explicitMimeType, 797 const String& explicitMimeType,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { 991 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() {
985 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) 992 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())
986 ->devToolsAgentImpl(); 993 ->devToolsAgentImpl();
987 } 994 }
988 995
989 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { 996 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) {
990 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); 997 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url));
991 } 998 }
992 999
993 } // namespace blink 1000 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698