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

@ -23,7 +23,7 @@ View::~View() {
delete view_;
}
#if defined(ENABLE_VIEW_API)
#if BUILDFLAG(ENABLE_VIEW_API)
void View::SetLayoutManager(mate::Handle<LayoutManager> layout_manager) {
layout_manager_.Reset(isolate(), layout_manager->GetWrapper());
view()->SetLayoutManager(layout_manager->TakeOver());
@ -53,7 +53,7 @@ mate::WrappableBase* View::New(mate::Arguments* args) {
void View::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(mate::StringToV8(isolate, "View"));
#if defined(ENABLE_VIEW_API)
#if BUILDFLAG(ENABLE_VIEW_API)
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("setLayoutManager", &View::SetLayoutManager)
.SetMethod("addChildView", &View::AddChildView)