Skip to content

Commit

Permalink
support no-displaying-insecure-content and allow-running-insecure-con…
Browse files Browse the repository at this point in the history
…tent

Fix #3123
  • Loading branch information
rogerwang committed Apr 14, 2015
1 parent e62c9f3 commit a77b085
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/shell_content_browser_client.cc
Expand Up @@ -370,6 +370,7 @@ void ShellContentBrowserClient::OverrideWebkitPrefs(
const GURL& url,
content::WebPreferences* prefs) {
nw::Package* package = shell_browser_main_parts()->package();
CommandLine* cmd_line = CommandLine::ForCurrentProcess();

// Disable web security.
prefs->dom_paste_enabled = true;
Expand All @@ -384,6 +385,11 @@ void ShellContentBrowserClient::OverrideWebkitPrefs(
prefs->plugins_enabled = true;
prefs->java_enabled = false;

prefs->allow_displaying_insecure_content =
!(cmd_line->HasSwitch(switches::kNoDisplayingInsecureContent));
prefs->allow_running_insecure_content =
cmd_line->HasSwitch(switches::kAllowRunningInsecureContent);

base::DictionaryValue* webkit;
if (package->root()->GetDictionary(switches::kmWebkit, &webkit)) {
webkit->GetBoolean(switches::kmJava, &prefs->java_enabled);
Expand Down

0 comments on commit a77b085

Please sign in to comment.