Pass synchronous messages by JSON string.

We are going to use IPC_MESSAGE_HANDLER_DELAY_REPLY to handle
synchronous messages but DictionaryValue is not copyable, so we pass the
JSON string instead.
This commit is contained in:
Cheng Zhao 2013-09-20 22:32:59 +08:00
parent 07b5039c64
commit ef5a4b5fe0
10 changed files with 44 additions and 20 deletions

View file

@ -5,6 +5,8 @@
#ifndef ATOM_BROWSER_ATOM_API_EVENT_H_
#define ATOM_BROWSER_ATOM_API_EVENT_H_
#include <string>
#include "base/basictypes.h"
#include "vendor/node/src/node_object_wrap.h"
@ -19,6 +21,9 @@ class Event : public node::ObjectWrap {
// Create a V8 Event object.
static v8::Handle<v8::Object> CreateV8Object();
// Get JSON string of the event.returnValue from a Event object.
static std::string GetReturnValue(v8::Handle<v8::Object> event);
// Accessor to return handle_, this follows Google C++ Style.
v8::Persistent<v8::Object>& handle() { return handle_; }