Renderer can now use process.send to send messages to browser.

This commit is contained in:
Cheng Zhao 2013-04-22 21:32:48 +08:00
parent a7c3bdbf5d
commit 66a0abe799
17 changed files with 167 additions and 54 deletions

View file

@ -7,17 +7,32 @@
#include "common/api/atom_bindings.h"
namespace content {
class RenderView;
}
namespace WebKit {
class WebFrame;
}
namespace atom {
class AtomRendererBindings : public AtomBindings {
public:
AtomRendererBindings();
explicit AtomRendererBindings(content::RenderView* render_view);
virtual ~AtomRendererBindings();
// Call BindTo for process object of the frame.
void BindToFrame(WebKit::WebFrame* frame);
// Add process.send and make process.on accept IPC message.
void AddIPCBindings(WebKit::WebFrame* frame);
private:
static v8::Handle<v8::Value> Send(const v8::Arguments &args);
content::RenderView* render_view_;
DISALLOW_COPY_AND_ASSIGN(AtomRendererBindings);
};