Initial empty window javascript binding.

This commit is contained in:
Cheng Zhao 2013-04-16 00:25:08 +08:00
parent 488d72e41b
commit 7da34e65f7
10 changed files with 206 additions and 5 deletions

View file

@ -5,11 +5,40 @@
#ifndef ATOM_BROWSER_API_ATOM_API_WINDOW_H_
#define ATOM_BROWSER_API_ATOM_API_WINDOW_H_
#include "vendor/node/src/node.h"
#include "vendor/node/src/node_object_wrap.h"
#include "browser/api/atom_api_event_emitter.h"
namespace base {
class DictionaryValue;
}
namespace atom {
class NativeWindow;
namespace api {
class Window : public EventEmitter {
public:
virtual ~Window();
static void Initialize(v8::Handle<v8::Object> target);
NativeWindow* window() { return window_.get(); }
protected:
explicit Window(v8::Handle<v8::Object> wrapper,
base::DictionaryValue* options);
private:
static v8::Handle<v8::Value> New(const v8::Arguments &args);
scoped_ptr<NativeWindow> window_;
DISALLOW_COPY_AND_ASSIGN(Window);
};
} // namespace api
} // namespace atom
#endif // ATOM_BROWSER_API_ATOM_API_WINDOW_H_