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

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: Addressed miu's comments. Created 4 years 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/22 00:14:30 nit: Is this local variable (intersectInfo) needed
xjz 2016/11/23 23:43:25 Not applicable. I find that we don't need make cha
784 htmlMediaElement.currentViewportIntersection();
785 mediaPlayer->viewportIntersectionChanged(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

Powered by Google App Engine
This is Rietveld 408576698