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:
Milan Burda 2018-05-29 10:09:51 +02:00 committed by Charles Kerr
parent ec44fb79d8
commit 45e78728bd
11 changed files with 47 additions and 22 deletions

View file

@ -11,6 +11,7 @@
#include "atom/browser/native_window.h"
#include "atom/browser/ui/file_dialog.h"
#include "atom/browser/web_contents_preferences.h"
#include "atom/common/options_switches.h"
#include "base/bind.h"
#include "base/files/file_util.h"
#include "chrome/common/pref_names.h"
@ -90,7 +91,8 @@ void AtomDownloadManagerDelegate::OnDownloadPathGenerated(
window = relay->window.get();
auto* web_preferences = WebContentsPreferences::From(web_contents);
bool offscreen = !web_preferences || web_preferences->IsEnabled("offscreen");
bool offscreen =
!web_preferences || web_preferences->IsEnabled(options::kOffscreen);
base::FilePath path;
GetItemSavePath(item, &path);