Discard all our custom V8 helpers, use native-mate instead.
This commit is contained in:
parent
ef5342b86e
commit
a040a96652
28 changed files with 484 additions and 1552 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue