summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-08-26 14:14:26 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-08-26 12:20:53 +0000
commit2672642af493339b3420d5e5235b77d9f560feb6 (patch)
tree914e6dfd0957be18093de5210c0b6d01f5f798c8 /src/core
parent7bc32104660dd9b5dfa9920a288797a7c2790559 (diff)
Support the command-line argument --allow-running-insecure-content
Reads the chromium command-line argument and pass it on to WebKit. This also prepares for adding it as proper API later. Task-number: QTBUG-54902 Change-Id: I391940ef43a88332f45cc3c97fe22514d7f6a76c Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/web_engine_settings.cpp4
-rw-r--r--src/core/web_engine_settings.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index 6c17c3ce9..550fd2814 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -44,6 +44,7 @@
#include "type_conversion.h"
#include "base/command_line.h"
+#include "chrome/common/chrome_switches.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/web_preferences.h"
@@ -232,11 +233,13 @@ void WebEngineSettings::initDefaults(bool offTheRecord)
!commandLine->HasSwitch(switches::kDisableExperimentalWebGL);
bool accelerated2dCanvas = content::GpuProcessHost::gpu_enabled() &&
!commandLine->HasSwitch(switches::kDisableAccelerated2dCanvas);
+ bool allowRunningInsecureContent = commandLine->HasSwitch(switches::kAllowRunningInsecureContent);
s_defaultAttributes.insert(ScrollAnimatorEnabled, smoothScrolling);
s_defaultAttributes.insert(WebGLEnabled, webGL);
s_defaultAttributes.insert(Accelerated2dCanvasEnabled, accelerated2dCanvas);
s_defaultAttributes.insert(AutoLoadIconsForPage, true);
s_defaultAttributes.insert(TouchIconsEnabled, false);
+ s_defaultAttributes.insert(AllowRunningInsecureContent, allowRunningInsecureContent);
}
if (offTheRecord)
m_attributes.insert(LocalStorageEnabled, false);
@@ -312,6 +315,7 @@ void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *p
prefs->fullscreen_supported = testAttribute(FullScreenSupportEnabled);
prefs->accelerated_2d_canvas_enabled = testAttribute(Accelerated2dCanvasEnabled);
prefs->experimental_webgl_enabled = testAttribute(WebGLEnabled);
+ prefs->allow_running_insecure_content = testAttribute(AllowRunningInsecureContent);
// Fonts settings.
prefs->standard_font_family_map[content::kCommonScript] = toString16(fontFamily(StandardFont));
diff --git a/src/core/web_engine_settings.h b/src/core/web_engine_settings.h
index e21eee8a9..e131af50c 100644
--- a/src/core/web_engine_settings.h
+++ b/src/core/web_engine_settings.h
@@ -79,7 +79,8 @@ public:
WebGLEnabled,
Accelerated2dCanvasEnabled,
AutoLoadIconsForPage,
- TouchIconsEnabled
+ TouchIconsEnabled,
+ AllowRunningInsecureContent
};
// Must match the values from the public API in qwebenginesettings.h.