Discard all our custom V8 helpers, use native-mate instead.

This commit is contained in:
Cheng Zhao 2014-04-22 23:07:21 +08:00
parent ef5342b86e
commit a040a96652
28 changed files with 484 additions and 1552 deletions

View file

@ -18,17 +18,14 @@ namespace api {
MenuWin::MenuWin() {
}
void MenuWin::Popup(NativeWindow* native_window) {
void MenuWin::Popup(Window* window) {
gfx::Point cursor = gfx::Screen::GetNativeScreen()->GetCursorScreenPoint();
menu_.reset(new atom::Menu2(model_.get()));
menu_->RunContextMenuAt(cursor);
}
void Menu::AttachToWindow(NativeWindow* window) {
if (window == NULL)
return node::ThrowTypeError("Window is dead");
static_cast<NativeWindowWin*>(native_window)->SetMenu(model_.get());
void Menu::AttachToWindow(Window* window) {
static_cast<NativeWindowWin*>(window->window())->SetMenu(model_.get());
}
// static