Implement Menu.closePopup on Windows/Linux
This commit is contained in:
parent
0a5ccdccb4
commit
91d1af053f
2 changed files with 10 additions and 11 deletions
|
@ -5,6 +5,8 @@
|
|||
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
|
||||
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "atom/browser/api/atom_api_menu.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "ui/display/screen.h"
|
||||
|
@ -21,10 +23,10 @@ class MenuViews : public Menu {
|
|||
protected:
|
||||
void PopupAt(
|
||||
Window* window, int x, int y, int positioning_item, bool async) override;
|
||||
void OnMenuClosed();
|
||||
void ClosePopupAt(int32_t window_id);
|
||||
|
||||
private:
|
||||
std::unique_ptr<views::MenuRunner> menu_runner_;
|
||||
std::map<int32_t, std::unique_ptr<views::MenuRunner>> menu_runners_;
|
||||
base::WeakPtrFactory<MenuViews> weak_factory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MenuViews);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue