feat: implement net.fetch (#36733)

This commit is contained in:
Jeremy Rose 2023-02-20 12:57:38 -08:00 committed by GitHub
parent 63f94f2359
commit 872d1fe05a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 969 additions and 539 deletions

View file

@ -17,6 +17,7 @@
#include "shell/browser/event_emitter_mixin.h"
#include "shell/browser/net/resolve_proxy_helper.h"
#include "shell/common/gin_helper/cleaned_up_at_exit.h"
#include "shell/common/gin_helper/constructible.h"
#include "shell/common/gin_helper/error_thrower.h"
#include "shell/common/gin_helper/function_template_extensions.h"
#include "shell/common/gin_helper/pinnable.h"
@ -57,6 +58,7 @@ namespace api {
class Session : public gin::Wrappable<Session>,
public gin_helper::Pinnable<Session>,
public gin_helper::Constructible<Session>,
public gin_helper::EventEmitterMixin<Session>,
public gin_helper::CleanedUpAtExit,
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
@ -71,6 +73,7 @@ class Session : public gin::Wrappable<Session>,
static gin::Handle<Session> CreateFrom(
v8::Isolate* isolate,
ElectronBrowserContext* browser_context);
static gin::Handle<Session> New(); // Dummy, do not use!
static Session* FromBrowserContext(content::BrowserContext* context);
@ -83,8 +86,7 @@ class Session : public gin::Wrappable<Session>,
// gin::Wrappable
static gin::WrapperInfo kWrapperInfo;
gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
v8::Isolate* isolate) override;
static void FillObjectTemplate(v8::Isolate*, v8::Local<v8::ObjectTemplate>);
const char* GetTypeName() override;
// Methods.