#ifndef CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_MAP_H_
#define CONTENT_BROWSER_COCOA_SYSTEM_HOTKEY_MAP_H_
#import <Cocoa/Cocoa.h>
#include <vector>
#include "base/gtest_prod_util.h"
#include "content/common/content_export.h"
namespace content {
struct SystemHotkey;
class CONTENT_EXPORT SystemHotkeyMap {
public:
SystemHotkeyMap();
SystemHotkeyMap(SystemHotkeyMap&&);
SystemHotkeyMap(const SystemHotkeyMap&) = delete;
SystemHotkeyMap& operator=(const SystemHotkeyMap&) = delete;
~SystemHotkeyMap();
bool ParseDictionary(NSDictionary* dictionary);
bool IsEventReserved(NSEvent* event) const;
private:
FRIEND_TEST_ALL_PREFIXES(SystemHotkeyMapTest, Parse);
FRIEND_TEST_ALL_PREFIXES(SystemHotkeyMapTest, ParseCustomEntries);
FRIEND_TEST_ALL_PREFIXES(SystemHotkeyMapTest, ParseMouse);
FRIEND_TEST_ALL_PREFIXES(SystemHotkeyMapTest,
ReverseWindowCyclingHotkeyExists);
FRIEND_TEST_ALL_PREFIXES(SystemHotkeyMapTest,
IgnoreUndocumentedShortcutEntries);
bool IsHotkeyReserved(unsigned short key_code, NSUInteger modifiers) const;
void ReserveHotkey(unsigned short key_code,
NSUInteger modifiers,
NSString* system_hotkey_identifier);
void ReserveHotkey(unsigned short key_code, NSUInteger modifiers);
std::vector<SystemHotkey> system_hotkeys_;
};
}
#endif