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

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: 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 unified diff | Download patch
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | public/web/WebPermissionClient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 } 196 }
197 197
198 bool FrameLoaderClientImpl::allowImage(bool enabledPerSettings, const KURL& imag eURL) 198 bool FrameLoaderClientImpl::allowImage(bool enabledPerSettings, const KURL& imag eURL)
199 { 199 {
200 if (m_webFrame->permissionClient()) 200 if (m_webFrame->permissionClient())
201 return m_webFrame->permissionClient()->allowImage(enabledPerSettings, im ageURL); 201 return m_webFrame->permissionClient()->allowImage(enabledPerSettings, im ageURL);
202 202
203 return enabledPerSettings; 203 return enabledPerSettings;
204 } 204 }
205 205
206 bool FrameLoaderClientImpl::allowMedia(const KURL& mediaURL)
207 {
208 if (m_webFrame->permissionClient())
209 return m_webFrame->permissionClient()->allowMedia(mediaURL);
210
211 return true;
212 }
213
206 bool FrameLoaderClientImpl::allowDisplayingInsecureContent(bool enabledPerSettin gs, SecurityOrigin* context, const KURL& url) 214 bool FrameLoaderClientImpl::allowDisplayingInsecureContent(bool enabledPerSettin gs, SecurityOrigin* context, const KURL& url)
207 { 215 {
208 if (m_webFrame->permissionClient()) 216 if (m_webFrame->permissionClient())
209 return m_webFrame->permissionClient()->allowDisplayingInsecureContent(en abledPerSettings, WebSecurityOrigin(context), WebURL(url)); 217 return m_webFrame->permissionClient()->allowDisplayingInsecureContent(en abledPerSettings, WebSecurityOrigin(context), WebURL(url));
210 218
211 return enabledPerSettings; 219 return enabledPerSettings;
212 } 220 }
213 221
214 bool FrameLoaderClientImpl::allowRunningInsecureContent(bool enabledPerSettings, SecurityOrigin* context, const KURL& url) 222 bool FrameLoaderClientImpl::allowRunningInsecureContent(bool enabledPerSettings, SecurityOrigin* context, const KURL& url)
215 { 223 {
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 m_webFrame->client()->didAbortLoading(m_webFrame); 815 m_webFrame->client()->didAbortLoading(m_webFrame);
808 } 816 }
809 817
810 void FrameLoaderClientImpl::dispatchDidChangeManifest() 818 void FrameLoaderClientImpl::dispatchDidChangeManifest()
811 { 819 {
812 if (m_webFrame->client()) 820 if (m_webFrame->client())
813 m_webFrame->client()->didChangeManifest(m_webFrame); 821 m_webFrame->client()->didChangeManifest(m_webFrame);
814 } 822 }
815 823
816 } // namespace blink 824 } // namespace blink
OLDNEW
« 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