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

Side by Side Diff: third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp

Issue 1906533002: Add 'autoplay' content settings and expose it to Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 295 }
296 296
297 bool FrameLoaderClientImpl::allowRunningInsecureContent(bool enabledPerSettings, SecurityOrigin* context, const KURL& url) 297 bool FrameLoaderClientImpl::allowRunningInsecureContent(bool enabledPerSettings, SecurityOrigin* context, const KURL& url)
298 { 298 {
299 if (m_webFrame->contentSettingsClient()) 299 if (m_webFrame->contentSettingsClient())
300 return m_webFrame->contentSettingsClient()->allowRunningInsecureContent( enabledPerSettings, WebSecurityOrigin(context), WebURL(url)); 300 return m_webFrame->contentSettingsClient()->allowRunningInsecureContent( enabledPerSettings, WebSecurityOrigin(context), WebURL(url));
301 301
302 return enabledPerSettings; 302 return enabledPerSettings;
303 } 303 }
304 304
305 bool FrameLoaderClientImpl::allowAutoplay(bool defaultValue)
306 {
307 if (m_webFrame->contentSettingsClient())
308 return m_webFrame->contentSettingsClient()->allowAutoplay(defaultValue);
309
310 return defaultValue;
311 }
312
305 void FrameLoaderClientImpl::didNotAllowScript() 313 void FrameLoaderClientImpl::didNotAllowScript()
306 { 314 {
307 if (m_webFrame->contentSettingsClient()) 315 if (m_webFrame->contentSettingsClient())
308 m_webFrame->contentSettingsClient()->didNotAllowScript(); 316 m_webFrame->contentSettingsClient()->didNotAllowScript();
309 } 317 }
310 318
311 void FrameLoaderClientImpl::didNotAllowPlugins() 319 void FrameLoaderClientImpl::didNotAllowPlugins()
312 { 320 {
313 if (m_webFrame->contentSettingsClient()) 321 if (m_webFrame->contentSettingsClient())
314 m_webFrame->contentSettingsClient()->didNotAllowPlugins(); 322 m_webFrame->contentSettingsClient()->didNotAllowPlugins();
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 return nullptr; 1060 return nullptr;
1053 return m_webFrame->client()->frameBlameContext(); 1061 return m_webFrame->client()->frameBlameContext();
1054 } 1062 }
1055 1063
1056 LinkResource* FrameLoaderClientImpl::createServiceWorkerLinkResource(HTMLLinkEle ment* owner) 1064 LinkResource* FrameLoaderClientImpl::createServiceWorkerLinkResource(HTMLLinkEle ment* owner)
1057 { 1065 {
1058 return ServiceWorkerLinkResource::create(owner); 1066 return ServiceWorkerLinkResource::create(owner);
1059 } 1067 }
1060 1068
1061 } // namespace blink 1069 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698