electron/atom/browser/api/atom_api_menu_mac.h

39 lines
849 B
C
Raw Normal View History

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