diff --git a/atom/renderer/api/atom_api_renderer_ipc.cc b/atom/renderer/api/atom_api_renderer_ipc.cc index 6db9c8e51732..7ec2ac6b4878 100644 --- a/atom/renderer/api/atom_api_renderer_ipc.cc +++ b/atom/renderer/api/atom_api_renderer_ipc.cc @@ -2,22 +2,23 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. -#include "atom/renderer/api/atom_api_renderer_ipc.h" +#include + #include "atom/common/api/api_messages.h" #include "atom/common/native_mate_converters/string16_converter.h" #include "atom/common/native_mate_converters/value_converter.h" #include "atom/common/node_bindings.h" #include "atom/common/node_includes.h" +#include "base/values.h" #include "content/public/renderer/render_frame.h" +#include "native_mate/arguments.h" #include "native_mate/dictionary.h" #include "third_party/blink/public/web/web_local_frame.h" using blink::WebLocalFrame; using content::RenderFrame; -namespace atom { - -namespace api { +namespace { RenderFrame* GetCurrentRenderFrame() { WebLocalFrame* frame = WebLocalFrame::FrameForCurrentContext(); @@ -78,20 +79,14 @@ void SendTo(mate::Arguments* args, args->ThrowError("Unable to send AtomFrameHostMsg_Message_To"); } -} // namespace api - -} // namespace atom - -namespace { - void Initialize(v8::Local exports, v8::Local unused, v8::Local context, void* priv) { mate::Dictionary dict(context->GetIsolate(), exports); - dict.SetMethod("send", &atom::api::Send); - dict.SetMethod("sendSync", &atom::api::SendSync); - dict.SetMethod("sendTo", &atom::api::SendTo); + dict.SetMethod("send", &Send); + dict.SetMethod("sendSync", &SendSync); + dict.SetMethod("sendTo", &SendTo); } } // namespace diff --git a/atom/renderer/api/atom_api_renderer_ipc.h b/atom/renderer/api/atom_api_renderer_ipc.h deleted file mode 100644 index ab243da52234..000000000000 --- a/atom/renderer/api/atom_api_renderer_ipc.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2016 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -#ifndef ATOM_RENDERER_API_ATOM_API_RENDERER_IPC_H_ -#define ATOM_RENDERER_API_ATOM_API_RENDERER_IPC_H_ - -#include - -#include "base/values.h" -#include "native_mate/arguments.h" - -namespace atom { - -namespace api { - -void Send(mate::Arguments* args, - const std::string& channel, - const base::ListValue& arguments); - -base::ListValue SendSync(mate::Arguments* args, - const std::string& channel, - const base::ListValue& arguments); - -void SendTo(mate::Arguments* args, - bool internal, - bool send_to_all, - int32_t web_contents_id, - const std::string& channel, - const base::ListValue& arguments); - -} // namespace api - -} // namespace atom - -#endif // ATOM_RENDERER_API_ATOM_API_RENDERER_IPC_H_ diff --git a/atom/renderer/atom_sandboxed_renderer_client.cc b/atom/renderer/atom_sandboxed_renderer_client.cc index 2744e9aadf26..96ebadfb7a6c 100644 --- a/atom/renderer/atom_sandboxed_renderer_client.cc +++ b/atom/renderer/atom_sandboxed_renderer_client.cc @@ -11,7 +11,6 @@ #include "atom/common/native_mate_converters/value_converter.h" #include "atom/common/node_bindings.h" #include "atom/common/options_switches.h" -#include "atom/renderer/api/atom_api_renderer_ipc.h" #include "atom/renderer/atom_render_frame_observer.h" #include "base/base_paths.h" #include "base/command_line.h" diff --git a/filenames.gni b/filenames.gni index 921415a984a5..255ecc2c0703 100644 --- a/filenames.gni +++ b/filenames.gni @@ -630,7 +630,6 @@ filenames = { "atom/common/platform_util_win.cc", "atom/common/promise_util.h", "atom/common/promise_util.cc", - "atom/renderer/api/atom_api_renderer_ipc.h", "atom/renderer/api/atom_api_renderer_ipc.cc", "atom/renderer/api/atom_api_spell_check_client.cc", "atom/renderer/api/atom_api_spell_check_client.h",