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

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: Rebased. 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
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | public/web/WebPermissionClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/FrameLoaderClientImpl.cpp
diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp
index bafedb8e47cc4408983d1fb564fb80975ef379f7..d4883b3f0c15b92899edb09f41f767a6f1be74fa 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())
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | public/web/WebPermissionClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698