Add WebContentsPreferences::IsNativeWindowOpenEnabled
This commit is contained in:
parent
a215e8fb82
commit
f7935b429a
2 changed files with 16 additions and 0 deletions
|
@ -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) {
|
||||
|
|
|
@ -38,6 +38,7 @@ class WebContentsPreferences
|
|||
content::WebContents* web_contents, base::CommandLine* command_line);
|
||||
|
||||
static bool IsSandboxed(content::WebContents* web_contents);
|
||||
static bool IsNativeWindowOpenEnabled(content::WebContents* web_contents);
|
||||
|
||||
// Modify the WebPreferences according to |web_contents|'s preferences.
|
||||
static void OverrideWebkitPrefs(
|
||||
|
|
Loading…
Reference in a new issue