Add isolated world web preference option

This commit is contained in:
Kevin Sawicki 2016-12-08 15:33:51 -08:00
parent cdf33ff3dc
commit 4bca6fe672
3 changed files with 7 additions and 0 deletions

View file

@ -119,6 +119,11 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches(
LOG(ERROR) << "preload url must be file:// protocol.";
}
// Run Electron APIs and preload script in isolated world
bool isolated;
if (web_preferences.GetBoolean("isolated", &isolated) && isolated)
command_line->AppendSwitch(switches::kIsolatedWorld);
// --background-color.
std::string color;
if (web_preferences.GetString(options::kBackgroundColor, &color))