build: define compile time features with buildflag header (#14840)

* build: define compile time features with buildflag header

* refactor: switch to BUILDFLAG(ENABLE_DESKTOP_CAPTURER)

* refactor: switch to BUILDFLAG(ENABLE_RUN_AS_NODE)

* refactor: switch to BUILDFLAG(ENABLE_OSR)

* refactor: switch to BUILDFLAG(ENABLE_VIEW_API)

* refactor: switch to BUILDFLAG(ENABLE_PEPPER_FLASH)

* refactor: switch to BUILDFLAG(OVERRIDE_LOCATION_PROVIDER)

* refactor: switch to BUILDFLAG(ENABLE_PDF_VIEWER)
This commit is contained in:
Robo 2018-10-02 01:30:53 +05:30 committed by John Kleinschmidt
parent 4af922c9a2
commit a24ad6bc14
31 changed files with 172 additions and 209 deletions

View file

@ -19,6 +19,7 @@
#include "atom/common/native_mate_converters/string16_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "atom/common/options_switches.h"
#include "electron/buildflags/buildflags.h"
#include "native_mate/handle.h"
#include "native_mate/persistent_dictionary.h"
@ -79,7 +80,7 @@ TopLevelWindow::TopLevelWindow(v8::Isolate* isolate,
if (options.Get("parent", &parent) && !parent.IsEmpty())
parent_window_.Reset(isolate, parent.ToV8());
#if defined(ENABLE_OSR)
#if BUILDFLAG(ENABLE_OSR)
// Offscreen windows are always created frameless.
mate::Dictionary web_preferences;
bool offscreen;