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:
parent
6781d5e3c8
commit
3ae3233e65
96 changed files with 622 additions and 1711 deletions
|
@ -5,11 +5,9 @@
|
|||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "native_mate/converter.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
#include "shell/common/native_mate_converters/file_path_converter.h"
|
||||
#include "shell/common/native_mate_converters/string16_converter.h"
|
||||
#include "shell/common/gin_converters/file_path_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
|
||||
namespace {
|
||||
|
@ -23,7 +21,8 @@ base::CommandLine::StringType GetSwitchValue(const std::string& name) {
|
|||
name.c_str());
|
||||
}
|
||||
|
||||
void AppendSwitch(const std::string& switch_string, mate::Arguments* args) {
|
||||
void AppendSwitch(const std::string& switch_string,
|
||||
gin_helper::Arguments* args) {
|
||||
auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
|
||||
if (base::EndsWith(switch_string, "-path",
|
||||
|
@ -47,7 +46,7 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
v8::Local<v8::Context> context,
|
||||
void* priv) {
|
||||
auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
mate::Dictionary dict(context->GetIsolate(), exports);
|
||||
gin_helper::Dictionary dict(context->GetIsolate(), exports);
|
||||
dict.SetMethod("hasSwitch", &HasSwitch);
|
||||
dict.SetMethod("getSwitchValue", &GetSwitchValue);
|
||||
dict.SetMethod("appendSwitch", &AppendSwitch);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue