move ipc use from rvh to rfh

This commit is contained in:
deepak1556 2018-03-09 15:01:09 +05:30
parent 0d12fc3033
commit 3cfe66e4c3
18 changed files with 222 additions and 197 deletions

View file

@ -7,6 +7,8 @@
#include "atom/common/api/api_messages.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
namespace atom {
@ -35,7 +37,11 @@ void RemoteCallbackFreer::RunDestructor() {
base::ASCIIToUTF16("ELECTRON_RENDERER_RELEASE_CALLBACK");
base::ListValue args;
args.AppendInteger(object_id_);
Send(new AtomViewMsg_Message(routing_id(), false, channel, args));
auto frame_host = web_contents()->GetMainFrame();
if (frame_host) {
frame_host->Send(new AtomFrameMsg_Message(frame_host->GetRoutingID(), false,
channel, args));
}
Observe(nullptr);
}