From 2672642af493339b3420d5e5235b77d9f560feb6 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 26 Aug 2016 14:14:26 +0200 Subject: Support the command-line argument --allow-running-insecure-content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/core/web_engine_settings.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/web_engine_settings.cpp') 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)); -- cgit v1.2.3