chore: use dummy WebRequestNS when NetworkService is enabled (#19300)
This commit is contained in:
parent
c79613b037
commit
478360f317
4 changed files with 82 additions and 2 deletions
38
shell/browser/api/atom_api_web_request_ns.cc
Normal file
38
shell/browser/api/atom_api_web_request_ns.cc
Normal file
|
@ -0,0 +1,38 @@
|
|||
// Copyright (c) 2019 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_web_request_ns.h"
|
||||
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace api {
|
||||
|
||||
WebRequestNS::WebRequestNS(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context) {
|
||||
Init(isolate);
|
||||
AttachAsUserData(browser_context);
|
||||
}
|
||||
|
||||
WebRequestNS::~WebRequestNS() = default;
|
||||
|
||||
// static
|
||||
mate::Handle<WebRequestNS> WebRequestNS::Create(
|
||||
v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context) {
|
||||
return mate::CreateHandle(isolate,
|
||||
new WebRequestNS(isolate, browser_context));
|
||||
}
|
||||
|
||||
// static
|
||||
void WebRequestNS::BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype) {
|
||||
prototype->SetClassName(mate::StringToV8(isolate, "WebRequest"));
|
||||
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate());
|
||||
}
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace electron
|
Loading…
Add table
Add a link
Reference in a new issue