2014-10-31 11:17:05 -07:00
|
|
|
// Copyright (c) 2013 GitHub, Inc.
|
2014-04-25 17:49:37 +08:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
2013-05-06 20:27:09 +08:00
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_MAC_H_
|
|
|
|
#define ATOM_BROWSER_API_ATOM_API_MENU_MAC_H_
|
|
|
|
|
2014-03-16 08:30:26 +08:00
|
|
|
#include "atom/browser/api/atom_api_menu.h"
|
2013-05-06 20:27:09 +08:00
|
|
|
|
2014-03-16 09:13:06 +08:00
|
|
|
#include <string>
|
|
|
|
|
2014-03-16 08:30:26 +08:00
|
|
|
#import "atom/browser/ui/cocoa/atom_menu_controller.h"
|
2013-05-16 10:54:37 +08:00
|
|
|
|
2013-05-06 20:27:09 +08:00
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
namespace api {
|
|
|
|
|
|
|
|
class MenuMac : public Menu {
|
|
|
|
protected:
|
2014-04-21 23:40:10 +08:00
|
|
|
MenuMac();
|
|
|
|
|
2016-01-22 10:51:51 -07:00
|
|
|
void PopupAt(Window* window, int x, int y, int positioning_item = 0) override;
|
2013-05-06 20:27:09 +08:00
|
|
|
|
2013-12-11 15:48:19 +08:00
|
|
|
base::scoped_nsobject<AtomMenuController> menu_controller_;
|
2013-05-16 10:54:37 +08:00
|
|
|
|
2013-05-06 20:27:09 +08:00
|
|
|
private:
|
2013-05-16 10:54:37 +08:00
|
|
|
friend class Menu;
|
|
|
|
|
2013-05-16 17:25:02 +08:00
|
|
|
static void SendActionToFirstResponder(const std::string& action);
|
|
|
|
|
2013-05-06 20:27:09 +08:00
|
|
|
DISALLOW_COPY_AND_ASSIGN(MenuMac);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace api
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
|
|
|
#endif // ATOM_BROWSER_API_ATOM_API_MENU_MAC_H_
|