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 00c36f940b08df6da5303e9a832f65c82a0b3134..de0945d4788d15977f94f54807c278a9c6bb298e 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" |
@@ -3987,8 +3988,8 @@ bool HTMLMediaElement::isAutoplayAllowedPerSettings() const { |
LocalFrame* frame = document().frame(); |
if (!frame) |
return false; |
- LocalFrameClient* localFrameClient = frame->loader().client(); |
- return localFrameClient && localFrameClient->allowAutoplay(true); |
+ ContentSettingsClient* settingsClient = frame->contentSettingsClient(); |
dcheng
2017/04/02 05:26:19
Since we already check that we have a frame here,
kinuko
2017/04/03 15:15:06
Done.
|
+ return settingsClient && settingsClient->allowAutoplay(true); |
} |
void HTMLMediaElement::setNetworkState(NetworkState state) { |