chore: remove native_mate (Part 14) (#21365)

* chore: remove uses of mate::Dictionary and mate::Handle

* chore: move CreateConstructor to gin_helper

* chore: remove native_mate

* chore: remove unneeded gin patch
This commit is contained in:
Cheng Zhao 2019-12-05 18:46:34 +09:00 committed by GitHub
parent 113b47d871
commit 0a741670a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 215 additions and 2120 deletions

View file

@ -5,10 +5,10 @@
#ifndef SHELL_COMMON_API_ATOM_API_KEY_WEAK_MAP_H_
#define SHELL_COMMON_API_ATOM_API_KEY_WEAK_MAP_H_
#include "native_mate/handle.h"
#include "native_mate/wrappable.h"
#include "gin/handle.h"
#include "shell/common/gin_converters/std_converter.h"
#include "shell/common/gin_helper/object_template_builder.h"
#include "shell/common/gin_helper/wrappable.h"
#include "shell/common/key_weak_map.h"
namespace electron {
@ -16,10 +16,10 @@ namespace electron {
namespace api {
template <typename K>
class KeyWeakMap : public mate::Wrappable<KeyWeakMap<K>> {
class KeyWeakMap : public gin_helper::Wrappable<KeyWeakMap<K>> {
public:
static mate::Handle<KeyWeakMap<K>> Create(v8::Isolate* isolate) {
return mate::CreateHandle(isolate, new KeyWeakMap<K>(isolate));
static gin::Handle<KeyWeakMap<K>> Create(v8::Isolate* isolate) {
return gin::CreateHandle(isolate, new KeyWeakMap<K>(isolate));
}
static void BuildPrototype(v8::Isolate* isolate,
@ -34,7 +34,7 @@ class KeyWeakMap : public mate::Wrappable<KeyWeakMap<K>> {
protected:
explicit KeyWeakMap(v8::Isolate* isolate) {
mate::Wrappable<KeyWeakMap<K>>::Init(isolate);
gin_helper::Wrappable<KeyWeakMap<K>>::Init(isolate);
}
~KeyWeakMap() override {}