build: fix broken Views build (#22621)

This commit is contained in:
Shelley Vohr 2020-03-10 20:03:41 +00:00 committed by GitHub
parent b607cfa220
commit 97fe4c7718
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 16 deletions

View file

@ -7,6 +7,7 @@
#include "base/strings/utf_string_conversions.h"
#include "shell/common/gin_helper/constructor.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/object_template_builder.h"
#include "shell/common/node_includes.h"
namespace electron {
@ -29,7 +30,7 @@ void LabelButton::SetText(const base::string16& text) {
}
bool LabelButton::IsDefault() const {
return label_button()->is_default();
return label_button()->GetIsDefault();
}
void LabelButton::SetIsDefault(bool is_default) {
@ -41,14 +42,14 @@ gin_helper::WrappableBase* LabelButton::New(gin_helper::Arguments* args,
const std::string& text) {
// Constructor call.
auto* view = new LabelButton(text);
view->InitWith(args->isolate(), args->GetThis());
view->InitWithArgs(args);
return view;
}
// static
void LabelButton::BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(gin_helper::StringTov8(isolate, "LabelButton"));
prototype->SetClassName(gin::StringToV8(isolate, "LabelButton"));
gin_helper::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetMethod("getText", &LabelButton::GetText)
.SetMethod("setText", &LabelButton::SetText)