2013-05-06 12:27:09 +00:00
|
|
|
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// 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
|
|
|
|
2014-03-16 01:13:06 +00:00
|
|
|
#include <string>
|
|
|
|
|
2014-03-16 00:30:26 +00:00
|
|
|
#import "atom/browser/ui/cocoa/atom_menu_controller.h"
|
2013-05-16 02:54:37 +00:00
|
|
|
|
2013-05-06 12:27:09 +00:00
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
namespace api {
|
|
|
|
|
|
|
|
class MenuMac : public Menu {
|
|
|
|
protected:
|
2014-04-21 15:40:10 +00:00
|
|
|
MenuMac();
|
|
|
|
|
2014-04-22 15:07:21 +00:00
|
|
|
virtual void Popup(Window* window) OVERRIDE;
|
2013-05-06 12:27:09 +00:00
|
|
|
|
2013-12-11 07:48:19 +00:00
|
|
|
base::scoped_nsobject<AtomMenuController> menu_controller_;
|
2013-05-16 02:54:37 +00:00
|
|
|
|
2013-05-06 12:27:09 +00:00
|
|
|
private:
|
2013-05-16 02:54:37 +00:00
|
|
|
friend class Menu;
|
|
|
|
|
2013-05-16 09:25:02 +00:00
|
|
|
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_
|