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

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

Issue 2786673002: Separate ContentSettingsClient out from LocalFrameClient (Closed)
Patch Set: added class-level comment Created 3 years, 8 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 9e41f765649fb17d020fe6f900fca37b8307dda5..cddd7e790b3509a90851794a87e41c75dce4ff5f 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"
@@ -5638,14 +5639,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;
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContextFeaturesClientImpl.cpp ('k') | third_party/WebKit/Source/core/frame/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698