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

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

Issue 2475643004: Monitor the intersection of video and viewport. (Closed)
Patch Set: Fix trybots failure. 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 std::unique_ptr<WebMediaPlayer> mediaPlayer =
779 source, client, &encryptedMedia, encryptedMedia.contentDecryptionModule(), 779 wrapUnique(webFrame->client()->createMediaPlayer(
780 sinkId)); 780 source, client, &encryptedMedia,
781 encryptedMedia.contentDecryptionModule(), sinkId));
782 WebMediaPlayer::ViewportIntersectionInfo intersectInfo =
783 htmlMediaElement.currentViewportIntersection();
784 if (!intersectInfo.intersectRect.isEmpty())
785 mediaPlayer->videoViewportIntersectionChanged(intersectInfo);
786 return mediaPlayer;
781 } 787 }
782 788
783 WebRemotePlaybackClient* FrameLoaderClientImpl::createWebRemotePlaybackClient( 789 WebRemotePlaybackClient* FrameLoaderClientImpl::createWebRemotePlaybackClient(
784 HTMLMediaElement& htmlMediaElement) { 790 HTMLMediaElement& htmlMediaElement) {
785 return HTMLMediaElementRemotePlayback::remote(htmlMediaElement); 791 return HTMLMediaElementRemotePlayback::remote(htmlMediaElement);
786 } 792 }
787 793
788 ObjectContentType FrameLoaderClientImpl::getObjectContentType( 794 ObjectContentType FrameLoaderClientImpl::getObjectContentType(
789 const KURL& url, 795 const KURL& url,
790 const String& explicitMimeType, 796 const String& explicitMimeType,
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() { 990 WebDevToolsAgentImpl* FrameLoaderClientImpl::devToolsAgent() {
985 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot()) 991 return WebLocalFrameImpl::fromFrame(m_webFrame->frame()->localFrameRoot())
986 ->devToolsAgentImpl(); 992 ->devToolsAgentImpl();
987 } 993 }
988 994
989 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) { 995 KURL FrameLoaderClientImpl::overrideFlashEmbedWithHTML(const KURL& url) {
990 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); 996 return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url));
991 } 997 }
992 998
993 } // namespace blink 999 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | third_party/WebKit/public/platform/WebMediaPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698