chore: no need to expose Initialize of ipc module (#16066)

This commit is contained in:
Cheng Zhao 2018-12-15 01:01:29 +09:00 committed by Shelley Vohr
parent 8584c2f14b
commit c7aa747891
2 changed files with 11 additions and 12 deletions

View file

@ -78,18 +78,22 @@ void SendTo(mate::Arguments* args,
args->ThrowError("Unable to send AtomFrameHostMsg_Message_To"); args->ThrowError("Unable to send AtomFrameHostMsg_Message_To");
} }
} // namespace api
} // namespace atom
namespace {
void Initialize(v8::Local<v8::Object> exports, void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, v8::Local<v8::Context> context,
void* priv) { void* priv) {
mate::Dictionary dict(context->GetIsolate(), exports); mate::Dictionary dict(context->GetIsolate(), exports);
dict.SetMethod("send", &Send); dict.SetMethod("send", &atom::api::Send);
dict.SetMethod("sendSync", &SendSync); dict.SetMethod("sendSync", &atom::api::SendSync);
dict.SetMethod("sendTo", &SendTo); dict.SetMethod("sendTo", &atom::api::SendTo);
} }
} // namespace api } // namespace
} // namespace atom NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_renderer_ipc, Initialize)
NODE_BUILTIN_MODULE_CONTEXT_AWARE(atom_renderer_ipc, atom::api::Initialize)

View file

@ -29,11 +29,6 @@ void SendTo(mate::Arguments* args,
const std::string& channel, const std::string& channel,
const base::ListValue& arguments); const base::ListValue& arguments);
void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv);
} // namespace api } // namespace api
} // namespace atom } // namespace atom