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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 1414853003: Add options for audio/video autoplay to chrome://settings/content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: third_party/WebKit/Source/core/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index dc0a1a8cb55da05d8b6880fbac9b4276ab6c84af..49b1796ea3487d5c2393692d7811320cb25a15af 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -642,6 +642,14 @@ bool FrameLoader::allowPlugins(ReasonForCallingAllowPlugins reason)
return allowed;
}
+bool FrameLoader::allowMediaAutoplay(bool hidden)
+{
+ // With Oilpan, a FrameLoader might be accessed after the
+ // FrameHost has been detached. FrameClient will not be
+ // accessible, so bail early.
+ return client() ? client()->allowMediaAutoplay(hidden) : true;
+}
+
void FrameLoader::updateForSameDocumentNavigation(const KURL& newURL, SameDocumentNavigationSource sameDocumentNavigationSource, PassRefPtr<SerializedScriptValue> data, HistoryScrollRestorationType scrollRestorationType, FrameLoadType type)
{
// Update the data source's request with the new URL to fake the URL change

Powered by Google App Engine
This is Rietveld 408576698