chore: move more constants to options_switches.h/cc (#13093)
* Add options::kNativeWindowOpen * Add options::kSandbox * Add options::kPlugins * Add options::kWebSecurity * Add options::kAllowRunningInsecureContent * Add options::kOffscreen
This commit is contained in:
parent
ec44fb79d8
commit
45e78728bd
11 changed files with 47 additions and 22 deletions
|
@ -84,7 +84,7 @@ TopLevelWindow::TopLevelWindow(v8::Isolate* isolate,
|
|||
mate::Dictionary web_preferences;
|
||||
bool offscreen;
|
||||
if (options.Get(options::kWebPreferences, &web_preferences) &&
|
||||
web_preferences.Get("offscreen", &offscreen) && offscreen) {
|
||||
web_preferences.Get(options::kOffscreen, &offscreen) && offscreen) {
|
||||
const_cast<mate::Dictionary&>(options).Set(options::kFrame, false);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -368,7 +368,7 @@ WebContents::WebContents(v8::Isolate* isolate,
|
|||
else if (options.Get("isBrowserView", &b) && b)
|
||||
type_ = BROWSER_VIEW;
|
||||
#if defined(ENABLE_OSR)
|
||||
else if (options.Get("offscreen", &b) && b)
|
||||
else if (options.Get(options::kOffscreen, &b) && b)
|
||||
type_ = OFF_SCREEN;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue