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

Side by Side 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 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 bool FrameLoaderClientImpl::allowImage(bool enabledPerSettings, const KURL& imag eURL) 206 bool FrameLoaderClientImpl::allowImage(bool enabledPerSettings, const KURL& imag eURL)
207 { 207 {
208 WebViewImpl* webview = m_webFrame->viewImpl(); 208 WebViewImpl* webview = m_webFrame->viewImpl();
209 if (webview && webview->permissionClient()) 209 if (webview && webview->permissionClient())
210 return webview->permissionClient()->allowImage(m_webFrame, enabledPerSet tings, imageURL); 210 return webview->permissionClient()->allowImage(m_webFrame, enabledPerSet tings, imageURL);
211 211
212 return enabledPerSettings; 212 return enabledPerSettings;
213 } 213 }
214 214
215 bool FrameLoaderClientImpl::allowMedia(bool enabledPerSettings, const KURL& medi aURL)
216 {
217 WebViewImpl* webview = m_webFrame->viewImpl();
218 if (webview && webview->permissionClient())
219 return webview->permissionClient()->allowMedia(m_webFrame, enabledPerSet tings, mediaURL);
220
221 return enabledPerSettings;
222 }
223
215 bool FrameLoaderClientImpl::allowDisplayingInsecureContent(bool enabledPerSettin gs, SecurityOrigin* context, const KURL& url) 224 bool FrameLoaderClientImpl::allowDisplayingInsecureContent(bool enabledPerSettin gs, SecurityOrigin* context, const KURL& url)
216 { 225 {
217 WebViewImpl* webview = m_webFrame->viewImpl(); 226 WebViewImpl* webview = m_webFrame->viewImpl();
218 if (webview && webview->permissionClient()) 227 if (webview && webview->permissionClient())
219 return webview->permissionClient()->allowDisplayingInsecureContent(m_web Frame, enabledPerSettings, WebSecurityOrigin(context), WebURL(url)); 228 return webview->permissionClient()->allowDisplayingInsecureContent(m_web Frame, enabledPerSettings, WebSecurityOrigin(context), WebURL(url));
220 229
221 return enabledPerSettings; 230 return enabledPerSettings;
222 } 231 }
223 232
224 bool FrameLoaderClientImpl::allowRunningInsecureContent(bool enabledPerSettings, SecurityOrigin* context, const KURL& url) 233 bool FrameLoaderClientImpl::allowRunningInsecureContent(bool enabledPerSettings, SecurityOrigin* context, const KURL& url)
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 return adoptPtr(m_webFrame->client()->createServiceWorkerProvider(m_webFrame , client.leakPtr())); 776 return adoptPtr(m_webFrame->client()->createServiceWorkerProvider(m_webFrame , client.leakPtr()));
768 } 777 }
769 778
770 void FrameLoaderClientImpl::didStopAllLoaders() 779 void FrameLoaderClientImpl::didStopAllLoaders()
771 { 780 {
772 if (m_webFrame->client()) 781 if (m_webFrame->client())
773 m_webFrame->client()->didAbortLoading(m_webFrame); 782 m_webFrame->client()->didAbortLoading(m_webFrame);
774 } 783 }
775 784
776 } // namespace WebKit 785 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698