mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
[Win] Use the modified Menu2 class.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "browser/api/atom_api_menu_win.h"
|
||||
|
||||
#include "ui/views/controls/menu/menu_2.h"
|
||||
#include "browser/ui/win/menu_2.h"
|
||||
#include "ui/gfx/point.h"
|
||||
|
||||
namespace atom {
|
||||
@@ -19,7 +19,7 @@ MenuWin::~MenuWin() {
|
||||
}
|
||||
|
||||
void MenuWin::Popup(NativeWindow* native_window) {
|
||||
menu_.reset(new views::Menu2(model_.get()));
|
||||
menu_.reset(new atom::Menu2(model_.get()));
|
||||
menu_->RunContextMenuAt(gfx::Point(0, 0));
|
||||
}
|
||||
|
||||
|
||||
@@ -7,12 +7,10 @@
|
||||
|
||||
#include "browser/api/atom_api_menu.h"
|
||||
|
||||
namespace views {
|
||||
class Menu2;
|
||||
}
|
||||
|
||||
namespace atom {
|
||||
|
||||
class Menu2;
|
||||
|
||||
namespace api {
|
||||
|
||||
class MenuWin : public Menu {
|
||||
@@ -24,7 +22,7 @@ class MenuWin : public Menu {
|
||||
virtual void Popup(NativeWindow* window) OVERRIDE;
|
||||
|
||||
private:
|
||||
scoped_ptr<views::Menu2> menu_;
|
||||
scoped_ptr<atom::Menu2> menu_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MenuWin);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user