chore: add missing gin::Wrappable
GetTypeName
overrides (#41531)
chore: add missing gin::Wrappable GetTypeName overrides Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
58ee15905b
commit
e7300ad4c8
10 changed files with 23 additions and 5 deletions
|
@ -162,6 +162,10 @@ v8::Local<v8::Promise> DataPipeHolder::ReadAll(v8::Isolate* isolate) {
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* DataPipeHolder::GetTypeName() {
|
||||||
|
return "DataPipeHolder";
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
gin::Handle<DataPipeHolder> DataPipeHolder::Create(
|
gin::Handle<DataPipeHolder> DataPipeHolder::Create(
|
||||||
v8::Isolate* isolate,
|
v8::Isolate* isolate,
|
||||||
|
|
|
@ -18,7 +18,9 @@ namespace electron::api {
|
||||||
// Retains reference to the data pipe.
|
// Retains reference to the data pipe.
|
||||||
class DataPipeHolder : public gin::Wrappable<DataPipeHolder> {
|
class DataPipeHolder : public gin::Wrappable<DataPipeHolder> {
|
||||||
public:
|
public:
|
||||||
|
// gin::Wrappable
|
||||||
static gin::WrapperInfo kWrapperInfo;
|
static gin::WrapperInfo kWrapperInfo;
|
||||||
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
static gin::Handle<DataPipeHolder> Create(
|
static gin::Handle<DataPipeHolder> Create(
|
||||||
v8::Isolate* isolate,
|
v8::Isolate* isolate,
|
||||||
|
|
|
@ -124,6 +124,10 @@ gin::ObjectTemplateBuilder PowerSaveBlocker::GetObjectTemplateBuilder(
|
||||||
.SetMethod("isStarted", &PowerSaveBlocker::IsStarted);
|
.SetMethod("isStarted", &PowerSaveBlocker::IsStarted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* PowerSaveBlocker::GetTypeName() {
|
||||||
|
return "PowerSaveBlocker";
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace electron::api
|
} // namespace electron::api
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -19,10 +19,10 @@ class PowerSaveBlocker : public gin::Wrappable<PowerSaveBlocker> {
|
||||||
static gin::Handle<PowerSaveBlocker> Create(v8::Isolate* isolate);
|
static gin::Handle<PowerSaveBlocker> Create(v8::Isolate* isolate);
|
||||||
|
|
||||||
// gin::Wrappable
|
// gin::Wrappable
|
||||||
|
static gin::WrapperInfo kWrapperInfo;
|
||||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
|
const char* GetTypeName() override;
|
||||||
static gin::WrapperInfo kWrapperInfo;
|
|
||||||
|
|
||||||
// disable copy
|
// disable copy
|
||||||
PowerSaveBlocker(const PowerSaveBlocker&) = delete;
|
PowerSaveBlocker(const PowerSaveBlocker&) = delete;
|
||||||
|
|
|
@ -24,8 +24,6 @@ namespace electron::api {
|
||||||
|
|
||||||
class WebRequest : public gin::Wrappable<WebRequest>, public WebRequestAPI {
|
class WebRequest : public gin::Wrappable<WebRequest>, public WebRequestAPI {
|
||||||
public:
|
public:
|
||||||
static gin::WrapperInfo kWrapperInfo;
|
|
||||||
|
|
||||||
// Return the WebRequest object attached to |browser_context|, create if there
|
// Return the WebRequest object attached to |browser_context|, create if there
|
||||||
// is no one.
|
// is no one.
|
||||||
// Note that the lifetime of WebRequest object is managed by Session, instead
|
// Note that the lifetime of WebRequest object is managed by Session, instead
|
||||||
|
@ -44,6 +42,7 @@ class WebRequest : public gin::Wrappable<WebRequest>, public WebRequestAPI {
|
||||||
content::BrowserContext* browser_context);
|
content::BrowserContext* browser_context);
|
||||||
|
|
||||||
// gin::Wrappable:
|
// gin::Wrappable:
|
||||||
|
static gin::WrapperInfo kWrapperInfo;
|
||||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
|
@ -53,9 +53,9 @@ class MessagePort : public gin::Wrappable<MessagePort>,
|
||||||
bool* threw_exception);
|
bool* threw_exception);
|
||||||
|
|
||||||
// gin::Wrappable
|
// gin::Wrappable
|
||||||
|
static gin::WrapperInfo kWrapperInfo;
|
||||||
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
|
||||||
v8::Isolate* isolate) override;
|
v8::Isolate* isolate) override;
|
||||||
static gin::WrapperInfo kWrapperInfo;
|
|
||||||
const char* GetTypeName() override;
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -182,6 +182,8 @@ class JSChunkedDataPipeGetter : public gin::Wrappable<JSChunkedDataPipeGetter>,
|
||||||
.SetMethod("done", &JSChunkedDataPipeGetter::Done);
|
.SetMethod("done", &JSChunkedDataPipeGetter::Done);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* GetTypeName() override { return "JSChunkedDataPipeGetter"; }
|
||||||
|
|
||||||
static gin::WrapperInfo kWrapperInfo;
|
static gin::WrapperInfo kWrapperInfo;
|
||||||
~JSChunkedDataPipeGetter() override = default;
|
~JSChunkedDataPipeGetter() override = default;
|
||||||
|
|
||||||
|
|
|
@ -271,6 +271,8 @@ class ChunkedDataPipeReadableStream
|
||||||
.SetMethod("read", &ChunkedDataPipeReadableStream::Read);
|
.SetMethod("read", &ChunkedDataPipeReadableStream::Read);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* GetTypeName() override { return "ChunkedDataPipeReadableStream"; }
|
||||||
|
|
||||||
static gin::WrapperInfo kWrapperInfo;
|
static gin::WrapperInfo kWrapperInfo;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -28,4 +28,8 @@ Event::~Event() = default;
|
||||||
|
|
||||||
gin::WrapperInfo Event::kWrapperInfo = {gin::kEmbedderNativeGin};
|
gin::WrapperInfo Event::kWrapperInfo = {gin::kEmbedderNativeGin};
|
||||||
|
|
||||||
|
const char* Event::GetTypeName() {
|
||||||
|
return GetClassName();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace gin_helper::internal
|
} // namespace gin_helper::internal
|
||||||
|
|
|
@ -31,6 +31,7 @@ class Event : public gin::Wrappable<Event>,
|
||||||
|
|
||||||
// gin::Wrappable
|
// gin::Wrappable
|
||||||
static gin::WrapperInfo kWrapperInfo;
|
static gin::WrapperInfo kWrapperInfo;
|
||||||
|
const char* GetTypeName() override;
|
||||||
|
|
||||||
~Event() override;
|
~Event() override;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue