Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3053)

Unified Diff: chrome/browser/ui/cocoa/system_hotkey_map.h

Issue 370293004: mac: Load the system hotkeys after launch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Histograms and dchecks. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/system_hotkey_map.h
diff --git a/chrome/browser/ui/cocoa/system_hotkey_map.h b/chrome/browser/ui/cocoa/system_hotkey_map.h
index 1c3f9312d0348789812338b41002250f7b6f963d..180cc1063f4b50e46e023964cfe1464c64eee292 100644
--- a/chrome/browser/ui/cocoa/system_hotkey_map.h
+++ b/chrome/browser/ui/cocoa/system_hotkey_map.h
@@ -5,9 +5,10 @@
#ifndef CHROME_BROWSER_UI_COCOA_SYSTEM_HOTKEY_MAP_H_
#define CHROME_BROWSER_UI_COCOA_SYSTEM_HOTKEY_MAP_H_
-#import <Foundation/Foundation.h>
+#import <Cocoa/Cocoa.h>
#include <vector>
+#include "base/gtest_prod_util.h"
#include "base/macros.h"
struct SystemHotkey;
@@ -25,10 +26,16 @@ class SystemHotkeyMap {
// invocation are stored.
bool ParseData(NSData* data);
- // Whether the hotkey has been reserved by the user.
- bool IsHotkeyReserved(int key_code, int modifiers);
+ // Whether the event corresponds to a hotkey that has been reserved by the
+ // system.
+ bool IsEventReserved(NSEvent* event) const;
private:
+ FRIEND_TEST_ALL_PREFIXES(SystemHotkeyMapTest, Parse);
+
+ // Whether the hotkey has been reserved by the user.
+ bool IsHotkeyReserved(int key_code, int modifiers) const;
+
// Create at least one record of a hotkey that is reserved by the user.
// Certain system hotkeys automatically reserve multiple key combinations.
void ReserveHotkey(int key_code, int modifiers, NSString* system_effect);

Powered by Google App Engine
This is Rietveld 408576698