From 4a0ec9c9a07266da5daf4deef474ea143f3ac5fc Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Thu, 9 Jan 2020 15:00:08 -0800 Subject: [PATCH] chore: remove native_mate --- .../browser/api/atom_api_service_worker_context.cc | 14 ++++++-------- .../browser/api/atom_api_service_worker_context.h | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/shell/browser/api/atom_api_service_worker_context.cc b/shell/browser/api/atom_api_service_worker_context.cc index 686d00c05cc18..488693877eff8 100644 --- a/shell/browser/api/atom_api_service_worker_context.cc +++ b/shell/browser/api/atom_api_service_worker_context.cc @@ -11,11 +11,10 @@ #include "content/public/browser/console_message.h" #include "content/public/browser/storage_partition.h" #include "gin/data_object_builder.h" -#include "native_mate/converter.h" -#include "native_mate/dictionary.h" -#include "native_mate/handle.h" +#include "gin/handle.h" #include "shell/browser/atom_browser_context.h" #include "shell/common/gin_converters/value_converter.h" +#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/node_includes.h" @@ -113,7 +112,6 @@ v8::Local ServiceWorkerContext::GetAllRunningWorkerInfo( ServiceWorkerRunningInfoToDict(isolate, std::move(iter->second))); } return builder.Build(); - ; } v8::Local ServiceWorkerContext::GetWorkerInfoFromID( @@ -131,18 +129,18 @@ v8::Local ServiceWorkerContext::GetWorkerInfoFromID( } // static -mate::Handle ServiceWorkerContext::Create( +gin::Handle ServiceWorkerContext::Create( v8::Isolate* isolate, AtomBrowserContext* browser_context) { - return mate::CreateHandle(isolate, - new ServiceWorkerContext(isolate, browser_context)); + return gin::CreateHandle(isolate, + new ServiceWorkerContext(isolate, browser_context)); } // static void ServiceWorkerContext::BuildPrototype( v8::Isolate* isolate, v8::Local prototype) { - prototype->SetClassName(mate::StringToV8(isolate, "ServiceWorkerContext")); + prototype->SetClassName(gin::StringToV8(isolate, "ServiceWorkerContext")); gin_helper::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate()) .SetMethod("getAllRunning", &ServiceWorkerContext::GetAllRunningWorkerInfo) diff --git a/shell/browser/api/atom_api_service_worker_context.h b/shell/browser/api/atom_api_service_worker_context.h index ece6dfb9fb26b..ea2aa226bf4dc 100644 --- a/shell/browser/api/atom_api_service_worker_context.h +++ b/shell/browser/api/atom_api_service_worker_context.h @@ -7,7 +7,7 @@ #include "content/public/browser/service_worker_context.h" #include "content/public/browser/service_worker_context_observer.h" -#include "native_mate/handle.h" +#include "gin/handle.h" #include "shell/common/gin_helper/trackable_object.h" namespace electron { @@ -20,7 +20,7 @@ class ServiceWorkerContext : public gin_helper::TrackableObject, public content::ServiceWorkerContextObserver { public: - static mate::Handle Create( + static gin::Handle Create( v8::Isolate* isolate, AtomBrowserContext* browser_context);