chore: remove native_mate (Part 12) (#20869)

* refactor: move mate::Event to gin

* refactor: move mate::Locker to gin

* refactor: convert contextBridge to gin

* refactor: convert contentTracing to gin

* refactor: remove callback converter of native_mate

* refactor: remove file_dialog_converter and native_window_converter from native_mate

* refactor: convert webFrame to gin

* refactor: move blink_converter to gin

* refactor: remove net_converter from native_mate

* refactor: remove event_emitter_caller_deprecated

* refactor: remove gurl_converter from native_mate

* refactor: remove file_path and string16_converter from native_mate

* refactor: remove image_converter from native_mate

* refactor: move value_converter to gin
This commit is contained in:
Cheng Zhao 2019-10-31 16:56:00 +09:00 committed by GitHub
parent 6781d5e3c8
commit 3ae3233e65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
96 changed files with 622 additions and 1711 deletions

View file

@ -9,9 +9,9 @@
#include <vector>
#include "base/bind.h"
#include "shell/common/api/locker.h"
#include "shell/common/gin_converters/std_converter.h"
#include "shell/common/gin_helper/function_template.h"
#include "shell/common/gin_helper/locker.h"
// Implements safe convertions between JS functions and base::Callback.
@ -43,7 +43,7 @@ struct V8FunctionInvoker<v8::Local<v8::Value>(ArgTypes...)> {
static v8::Local<v8::Value> Go(v8::Isolate* isolate,
const SafeV8Function& function,
ArgTypes... raw) {
mate::Locker locker(isolate);
gin_helper::Locker locker(isolate);
v8::EscapableHandleScope handle_scope(isolate);
if (!function.IsAlive())
return v8::Null(isolate);
@ -68,7 +68,7 @@ struct V8FunctionInvoker<void(ArgTypes...)> {
static void Go(v8::Isolate* isolate,
const SafeV8Function& function,
ArgTypes... raw) {
mate::Locker locker(isolate);
gin_helper::Locker locker(isolate);
v8::HandleScope handle_scope(isolate);
if (!function.IsAlive())
return;
@ -91,7 +91,7 @@ struct V8FunctionInvoker<ReturnType(ArgTypes...)> {
static ReturnType Go(v8::Isolate* isolate,
const SafeV8Function& function,
ArgTypes... raw) {
mate::Locker locker(isolate);
gin_helper::Locker locker(isolate);
v8::HandleScope handle_scope(isolate);
ReturnType ret = ReturnType();
if (!function.IsAlive())