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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.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/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 8e001981251379fc0a86ea15d51e8c2a2fb9457d..ea456890d092e95c75287d73ad1b83d8c8fd1694 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -50,6 +50,7 @@
#include "core/events/KeyboardEvent.h"
#include "core/events/MouseEvent.h"
#include "core/events/PageTransitionEvent.h"
+#include "core/frame/ContentSettingsClient.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/LocalFrame.h"
@@ -676,13 +677,13 @@ void FrameLoader::setOpener(LocalFrame* opener) {
bool FrameLoader::allowPlugins(ReasonForCallingAllowPlugins reason) {
// With Oilpan, a FrameLoader might be accessed after the Page has been
// detached. FrameClient will not be accessible, so bail early.
- if (!client())
+ if (!client() || !m_frame->contentSettingsClient())
dcheng 2017/04/02 05:26:19 Similarly, I think we ideally shouldn't need to nu
kinuko 2017/04/03 15:15:06 Done.
return false;
Settings* settings = m_frame->settings();
- bool allowed =
- client()->allowPlugins(settings && settings->getPluginsEnabled());
+ bool allowed = m_frame->contentSettingsClient()->allowPlugins(
+ settings && settings->getPluginsEnabled());
if (!allowed && reason == AboutToInstantiatePlugin)
- client()->didNotAllowPlugins();
+ m_frame->contentSettingsClient()->didNotAllowPlugins();
return allowed;
}

Powered by Google App Engine
This is Rietveld 408576698