Add API to SendActionToFirstResponder.
It's important to bind application menu items to curtain actions of first responder, like 'quit', 'minimize', 'copy' etc. This API gives developers ability to do most of them in javascript.
This commit is contained in:
parent
5d985aae09
commit
faf7280d1f
5 changed files with 31 additions and 0 deletions
|
@ -31,6 +31,9 @@ class MenuMac : public Menu {
|
|||
// submenus and set their titles.
|
||||
static void FixMenuTitles(NSMenu* menu);
|
||||
|
||||
// Fake sending an action from the application menu.
|
||||
static void SendActionToFirstResponder(const std::string& action);
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(MenuMac);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue