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

Unified Diff: Source/web/FrameLoaderClientImpl.cpp

Issue 27694002: Ability to block <audio> and <video> media. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Better rebase. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/web/FrameLoaderClientImpl.cpp
diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp
index 2913251b1fae28a3591d004907f57d34b1fdf65f..6fce26de7c35ba38f9fd5570eb9941fdce90d702 100644
--- a/Source/web/FrameLoaderClientImpl.cpp
+++ b/Source/web/FrameLoaderClientImpl.cpp
@@ -203,6 +203,14 @@ bool FrameLoaderClientImpl::allowImage(bool enabledPerSettings, const KURL& imag
return enabledPerSettings;
}
+bool FrameLoaderClientImpl::allowMedia(const KURL& mediaURL)
+{
+ if (m_webFrame->permissionClient())
+ return m_webFrame->permissionClient()->allowMedia(mediaURL);
+
+ return true;
+}
+
bool FrameLoaderClientImpl::allowDisplayingInsecureContent(bool enabledPerSettings, SecurityOrigin* context, const KURL& url)
{
if (m_webFrame->permissionClient())

Powered by Google App Engine
This is Rietveld 408576698