summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/web_engine_settings.cpp')
-rw-r--r--src/core/web_engine_settings.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index 754fa2f51..8e284c9d6 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,6 +233,7 @@ 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);
@@ -239,6 +241,7 @@ void WebEngineSettings::initDefaults(bool offTheRecord)
s_defaultAttributes.insert(TouchIconsEnabled, false);
s_defaultAttributes.insert(FocusOnNavigationEnabled, true);
s_defaultAttributes.insert(PrintElementBackgrounds, true);
+ s_defaultAttributes.insert(AllowRunningInsecureContent, allowRunningInsecureContent);
}
if (offTheRecord)
m_attributes.insert(LocalStorageEnabled, false);
@@ -315,6 +318,7 @@ void WebEngineSettings::applySettingsToWebPreferences(content::WebPreferences *p
prefs->accelerated_2d_canvas_enabled = testAttribute(Accelerated2dCanvasEnabled);
prefs->experimental_webgl_enabled = testAttribute(WebGLEnabled);
prefs->should_print_backgrounds = testAttribute(PrintElementBackgrounds);
+ prefs->allow_running_insecure_content = testAttribute(AllowRunningInsecureContent);
// Fonts settings.
prefs->standard_font_family_map[content::kCommonScript] = toString16(fontFamily(StandardFont));