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

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

Issue 2786673002: Separate ContentSettingsClient out from LocalFrameClient (Closed)
Patch Set: dchecks 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 43aaf0a8818e7d3dffa5b297bf1756910e408cac..d1f21da42260238c9020d34b7bc92e28a26fa0ee 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"
@@ -5639,14 +5640,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