No more C++ RecordedObject and ObjectsRegistry code.

All RPC API will be implemented in pure javascript.
This commit is contained in:
Cheng Zhao 2013-04-25 15:02:58 +08:00
parent d723173bc7
commit 0692776020
9 changed files with 9 additions and 161 deletions

View file

@ -7,7 +7,8 @@
#include <iosfwd>
#include "browser/api/atom_api_recorded_object.h"
#include "base/basictypes.h"
#include "vendor/node/src/node_object_wrap.h"
namespace base {
class ListValue;
@ -20,13 +21,16 @@ namespace api {
// Class interiting EventEmitter should assume it's a javascript object which
// interits require('events').EventEmitter, this class provides many helper
// methods to do event processing in C++.
class EventEmitter : public RecordedObject {
class EventEmitter : public node::ObjectWrap {
public:
virtual ~EventEmitter();
// Emit an event and returns whether the handler has called preventDefault().
bool Emit(const std::string& name, base::ListValue* args);
// Small accessor to return handle_, this follows Google C++ Style.
v8::Persistent<v8::Object>& handle() { return handle_; }
protected:
explicit EventEmitter(v8::Handle<v8::Object> wrapper);