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

Unified Diff: third_party/WebKit/Source/web/LocalFrameClientImpl.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/web/LocalFrameClientImpl.cpp
diff --git a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
index fdf2a5f3954cccb483ffc869aae63d3228746da9..9aac7c698a8a42d49df7764dc46fe142a118bd15 100644
--- a/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
+++ b/third_party/WebKit/Source/web/LocalFrameClientImpl.cpp
@@ -84,7 +84,6 @@
#include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h"
#include "public/web/WebAutofillClient.h"
-#include "public/web/WebContentSettingsClient.h"
#include "public/web/WebDOMEvent.h"
#include "public/web/WebDocument.h"
#include "public/web/WebFormElement.h"
@@ -225,77 +224,6 @@ void LocalFrameClientImpl::didUpdateCurrentHistoryItem() {
m_webFrame->client()->didUpdateCurrentHistoryItem();
}
-bool LocalFrameClientImpl::allowScript(bool enabledPerSettings) {
- if (m_webFrame->contentSettingsClient())
- return m_webFrame->contentSettingsClient()->allowScript(enabledPerSettings);
-
- return enabledPerSettings;
-}
-
-bool LocalFrameClientImpl::allowScriptFromSource(bool enabledPerSettings,
- const KURL& scriptURL) {
- if (m_webFrame->contentSettingsClient()) {
- return m_webFrame->contentSettingsClient()->allowScriptFromSource(
- enabledPerSettings, scriptURL);
- }
-
- return enabledPerSettings;
-}
-
-bool LocalFrameClientImpl::allowPlugins(bool enabledPerSettings) {
- if (m_webFrame->contentSettingsClient()) {
- return m_webFrame->contentSettingsClient()->allowPlugins(
- enabledPerSettings);
- }
-
- return enabledPerSettings;
-}
-
-bool LocalFrameClientImpl::allowImage(bool enabledPerSettings,
- const KURL& imageURL) {
- if (m_webFrame->contentSettingsClient()) {
- return m_webFrame->contentSettingsClient()->allowImage(enabledPerSettings,
- imageURL);
- }
-
- return enabledPerSettings;
-}
-
-bool LocalFrameClientImpl::allowRunningInsecureContent(bool enabledPerSettings,
- SecurityOrigin* context,
- const KURL& url) {
- if (m_webFrame->contentSettingsClient()) {
- return m_webFrame->contentSettingsClient()->allowRunningInsecureContent(
- enabledPerSettings, WebSecurityOrigin(context), WebURL(url));
- }
-
- return enabledPerSettings;
-}
-
-bool LocalFrameClientImpl::allowAutoplay(bool defaultValue) {
- if (m_webFrame->contentSettingsClient())
- return m_webFrame->contentSettingsClient()->allowAutoplay(defaultValue);
-
- return defaultValue;
-}
-
-void LocalFrameClientImpl::passiveInsecureContentFound(const KURL& url) {
- if (m_webFrame->contentSettingsClient()) {
- return m_webFrame->contentSettingsClient()->passiveInsecureContentFound(
- WebURL(url));
- }
-}
-
-void LocalFrameClientImpl::didNotAllowScript() {
- if (m_webFrame->contentSettingsClient())
- m_webFrame->contentSettingsClient()->didNotAllowScript();
-}
-
-void LocalFrameClientImpl::didNotAllowPlugins() {
- if (m_webFrame->contentSettingsClient())
- m_webFrame->contentSettingsClient()->didNotAllowPlugins();
-}
-
bool LocalFrameClientImpl::hasWebView() const {
return m_webFrame->viewImpl();
}
@@ -963,6 +891,10 @@ LocalFrameClientImpl::createServiceWorkerProvider() {
return WTF::wrapUnique(m_webFrame->client()->createServiceWorkerProvider());
}
+ContentSettingsClient& LocalFrameClientImpl::contentSettingsClient() {
+ return m_webFrame->contentSettingsClient();
+}
+
SharedWorkerRepositoryClient*
LocalFrameClientImpl::sharedWorkerRepositoryClient() {
return m_webFrame->sharedWorkerRepositoryClient();
« no previous file with comments | « third_party/WebKit/Source/web/LocalFrameClientImpl.h ('k') | third_party/WebKit/Source/web/StorageClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698