#include <vector>
-#include "base/logging.h"
#include "atom/browser/api/event.h"
-#include "atom/common/v8/native_type_conversions.h"
-#include "content/public/browser/browser_thread.h"
+#include "atom/common/native_mate_converters/string16_converter.h"
+#include "atom/common/native_mate_converters/v8_value_converter.h"
+#include "base/logging.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/values.h"
#include "atom/common/node_includes.h"
AtomBrowserBindings::AtomBrowserBindings() {
}
-AtomBrowserBindings::~AtomBrowserBindings() {
-}
-
void AtomBrowserBindings::OnRendererMessage(int process_id,
int routing_id,
const string16& channel,
// process.emit(channel, 'message', process_id, routing_id);
std::vector<v8::Handle<v8::Value>> arguments;
arguments.reserve(3 + args.GetSize());
- arguments.push_back(ToV8Value(channel));
+ arguments.push_back(mate::ConvertToV8(node_isolate, channel));
const base::Value* value;
if (args.Get(0, &value))
arguments.push_back(converter->ToV8Value(value, global_env->context()));
// process.emit(channel, 'sync-message', event, process_id, routing_id);
std::vector<v8::Handle<v8::Value>> arguments;
arguments.reserve(3 + args.GetSize());
- arguments.push_back(ToV8Value(channel));
+ arguments.push_back(mate::ConvertToV8(node_isolate, channel));
const base::Value* value;
if (args.Get(0, &value))
arguments.push_back(converter->ToV8Value(value, global_env->context()));
#ifndef ATOM_BROWSER_API_ATOM_BROWSER_BINDINGS_H_
#define ATOM_BROWSER_API_ATOM_BROWSER_BINDINGS_H_
-#include "base/strings/string16.h"
#include "atom/common/api/atom_bindings.h"
-#include "atom/common/v8/scoped_persistent.h"
+#include "base/strings/string16.h"
namespace base {
class ListValue;
class AtomBrowserBindings : public AtomBindings {
public:
AtomBrowserBindings();
- virtual ~AtomBrowserBindings();
// Called when received a message from renderer.
void OnRendererMessage(int process_id,