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

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: Rename "video" to "media". Created 7 years, 2 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 d7b2ce97b1a9200f3435f19f3be911ae3da6e1c1..6ce80e3405313fb0d2ef51a4c944f09c7f955d2b 100644
--- a/Source/web/FrameLoaderClientImpl.cpp
+++ b/Source/web/FrameLoaderClientImpl.cpp
@@ -212,6 +212,15 @@ bool FrameLoaderClientImpl::allowImage(bool enabledPerSettings, const KURL& imag
return enabledPerSettings;
}
+bool FrameLoaderClientImpl::allowMedia(bool enabledPerSettings, const KURL& mediaURL)
+{
+ WebViewImpl* webview = m_webFrame->viewImpl();
+ if (webview && webview->permissionClient())
+ return webview->permissionClient()->allowMedia(m_webFrame, enabledPerSettings, mediaURL);
+
+ return enabledPerSettings;
+}
+
bool FrameLoaderClientImpl::allowDisplayingInsecureContent(bool enabledPerSettings, SecurityOrigin* context, const KURL& url)
{
WebViewImpl* webview = m_webFrame->viewImpl();

Powered by Google App Engine
This is Rietveld 408576698