Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
index 920ab117c5f36287cde9d779bafc3f069e51be63..aeeca2cdba7ac7d13c3a6dd8facb3fa159a2d224 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp |
@@ -43,6 +43,7 @@ |
#include "core/dom/TaskRunnerHelper.h" |
#include "core/dom/shadow/ShadowRoot.h" |
#include "core/events/Event.h" |
+#include "core/frame/ContentSettingsClient.h" |
#include "core/frame/FrameView.h" |
#include "core/frame/LocalFrame.h" |
#include "core/frame/LocalFrameClient.h" |
@@ -3933,8 +3934,7 @@ bool HTMLMediaElement::isAutoplayAllowedPerSettings() const { |
LocalFrame* frame = document().frame(); |
if (!frame) |
return false; |
- LocalFrameClient* localFrameClient = frame->loader().client(); |
- return localFrameClient && localFrameClient->allowAutoplay(true); |
+ return frame->contentSettingsClient()->allowAutoplay(true); |
} |
void HTMLMediaElement::setNetworkState(NetworkState state) { |