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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2786673002: Separate ContentSettingsClient out from LocalFrameClient (Closed)
Patch Set: fix Created 3 years, 9 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/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index c518dcc62546412e7d180c0de22139abe78270f6..fe14b921ab43206d21c8ee125bed77aa2818a3d5 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -135,6 +135,7 @@
#include "core/events/ScopedEventQueue.h"
#include "core/events/VisualViewportResizeEvent.h"
#include "core/events/VisualViewportScrollEvent.h"
+#include "core/frame/ContentSettingsClient.h"
#include "core/frame/DOMTimer.h"
#include "core/frame/DOMVisualViewport.h"
#include "core/frame/EventHandlerRegistry.h"
@@ -5635,14 +5636,14 @@ bool Document::canExecuteScripts(ReasonForCallingCanExecuteScripts reason) {
DCHECK(frame())
<< "you are querying canExecuteScripts on a non contextDocument.";
- LocalFrameClient* client = frame()->loader().client();
- if (!client)
+ ContentSettingsClient* settingsClient = frame()->contentSettingsClient();
+ if (!settingsClient)
return false;
Settings* settings = frame()->settings();
- if (!client->allowScript(settings && settings->getScriptEnabled())) {
+ if (!settingsClient->allowScript(settings && settings->getScriptEnabled())) {
if (reason == AboutToExecuteScript)
- client->didNotAllowScript();
+ settingsClient->didNotAllowScript();
return false;
}

Powered by Google App Engine
This is Rietveld 408576698