chore: remove native_mate (Part 7) (#20561)
* refactor: use gin converters in api::Protocol * refactor: convert JS constructor impl to gin * refactor: use InitWithArgs helper * fix: gin_helper::Dictionary should behave the same with mate * fix cpplint warnings * refactor: no more need to patch gin/dictionary.h
This commit is contained in:
parent
6c6bff81ac
commit
1ecfcc8c70
43 changed files with 274 additions and 368 deletions
|
@ -61,22 +61,4 @@ class KeyWeakMap : public mate::Wrappable<KeyWeakMap<K>> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
namespace gin {
|
||||
|
||||
// TODO(zcbenz): Remove this after converting KeyWeakMap to gin::Wrapper.
|
||||
template <typename T>
|
||||
struct Converter<electron::api::KeyWeakMap<T>*> {
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
electron::api::KeyWeakMap<T>** out) {
|
||||
return mate::ConvertFromV8(isolate, val, out);
|
||||
}
|
||||
static v8::Local<v8::Value> ToV8(v8::Isolate* isolate,
|
||||
electron::api::KeyWeakMap<T>* in) {
|
||||
return mate::ConvertToV8(isolate, in);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace gin
|
||||
|
||||
#endif // SHELL_COMMON_API_ATOM_API_KEY_WEAK_MAP_H_
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "base/hash/hash.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
#include "shell/common/gin_converters/native_mate_handle_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
#include "url/origin.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue