chore: remove native_mate (Part 3) (#20131)
* use gin converter in atom_api_menu * please only put necessary includes in header Having include in header means they have dependency relationship, putting arbitrary includes really really really really really makes refacoring much harder. * remove some simple uses of callback_converter_deprecated.h * use gin callback converter in file_dialog code * use gin in ErrorThrower * use gin in atom_bundle_mover * fix mistake in node stream * deprecate native_mate version of event_emitter_caller * use gin in node_bindings * remove usages of native_mate event_emitter_caller.h except for EventEmitter * fix compilation on Windows * gin::Arguments behaves differently on GetNext * just use StringToV8
This commit is contained in:
parent
7be1905023
commit
2c23e44ed9
61 changed files with 515 additions and 323 deletions
|
@ -22,12 +22,12 @@
|
|||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/common/content_paths.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "shell/common/api/event_emitter_caller.h"
|
||||
#include "shell/common/api/locker.h"
|
||||
#include "shell/common/atom_command_line.h"
|
||||
#include "shell/common/gin_converters/file_path_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/event_emitter_caller.h"
|
||||
#include "shell/common/mac/main_application_bundle.h"
|
||||
#include "shell/common/native_mate_converters/file_path_converter.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
|
||||
#define ELECTRON_BUILTIN_MODULES(V) \
|
||||
|
@ -314,7 +314,7 @@ node::Environment* NodeBindings::CreateEnvironment(
|
|||
break;
|
||||
}
|
||||
|
||||
mate::Dictionary global(context->GetIsolate(), context->Global());
|
||||
gin_helper::Dictionary global(context->GetIsolate(), context->Global());
|
||||
// Do not set DOM globals for renderer process.
|
||||
// We must set this before the node bootstrapper which is run inside
|
||||
// CreateEnvironment
|
||||
|
@ -351,7 +351,7 @@ node::Environment* NodeBindings::CreateEnvironment(
|
|||
context->GetIsolate()->SetMicrotasksPolicy(v8::MicrotasksPolicy::kScoped);
|
||||
}
|
||||
|
||||
mate::Dictionary process(context->GetIsolate(), env->process_object());
|
||||
gin_helper::Dictionary process(context->GetIsolate(), env->process_object());
|
||||
process.SetReadOnly("type", process_type);
|
||||
process.Set("resourcesPath", resources_path);
|
||||
// The path to helper app.
|
||||
|
@ -364,7 +364,7 @@ node::Environment* NodeBindings::CreateEnvironment(
|
|||
|
||||
void NodeBindings::LoadEnvironment(node::Environment* env) {
|
||||
node::LoadEnvironment(env);
|
||||
mate::EmitEvent(env->isolate(), env->process_object(), "loaded");
|
||||
gin_helper::EmitEvent(env->isolate(), env->process_object(), "loaded");
|
||||
}
|
||||
|
||||
void NodeBindings::PrepareMessageLoop() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue