Add WebContentsPreferences::IsNativeWindowOpenEnabled

This commit is contained in:
Ryohei Ikegami 2017-03-19 17:12:25 +09:00
parent a215e8fb82
commit f7935b429a
2 changed files with 16 additions and 0 deletions

View file

@ -208,6 +208,21 @@ bool WebContentsPreferences::IsSandboxed(content::WebContents* web_contents) {
return sandboxed;
}
bool WebContentsPreferences::IsNativeWindowOpenEnabled(content::WebContents* web_contents) {
WebContentsPreferences* self;
if (!web_contents)
return false;
self = FromWebContents(web_contents);
if (!self)
return false;
base::DictionaryValue& web_preferences = self->web_preferences_;
bool use = false;
web_preferences.GetBoolean("nativeWindowOpen", &use);
return use;
}
// static
void WebContentsPreferences::OverrideWebkitPrefs(
content::WebContents* web_contents, content::WebPreferences* prefs) {