summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/browser_window.h
diff options
context:
space:
mode:
authorjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 14:59:06 +0000
committerjeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 14:59:06 +0000
commit3641da6c02910960ef419d38a161081a9ce1d7b2 (patch)
tree1123c9e72bc88275779d8e89060ed0cfe73cb172 /chrome/browser/cocoa/browser_window.h
parent73820078eac1040173047912c1f4d413a0eca696 (diff)
downloadchromium_src-3641da6c02910960ef419d38a161081a9ce1d7b2.zip
chromium_src-3641da6c02910960ef419d38a161081a9ce1d7b2.tar.gz
chromium_src-3641da6c02910960ef419d38a161081a9ce1d7b2.tar.bz2
Add facitility for Global Keyboard shortcuts.
Also, do some housekeeping for our current shortcuts. * Command-Option-l - Downloads [same shortcut as Safari]. * Command-Shift-[/] - Back/forward tab. * cntrl-pageup/pagedn - Back/forward tab. Global Keyboard events are intercepted by a new BrowserWindow custom class. BUG=12537,15486 TEST=Check that above keyboard shortcuts work as advertised. Review URL: http://codereview.chromium.org/149325 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/browser_window.h')
-rw-r--r--chrome/browser/cocoa/browser_window.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/browser_window.h b/chrome/browser/cocoa/browser_window.h
new file mode 100644
index 0000000..3c43577
--- /dev/null
+++ b/chrome/browser/cocoa/browser_window.h
@@ -0,0 +1,20 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_COCOA_BROWSER_WINDOW_H_
+#define CHROME_BROWSER_COCOA_BROWSER_WINDOW_H_
+
+#import <Cocoa/Cocoa.h>
+
+// Cocoa class representing a Chrome browser window.
+// We need to override NSWindow with our own class since we need access to all
+// unhandled keyboard events and subclassing NSWindow is the only method to do
+// this.
+@interface ChromeBrowserWindow : NSWindow
+
+// Override, so we can handle global keyboard events.
+- (BOOL)performKeyEquivalent:(NSEvent*)theEvent;
+@end
+
+#endif // CHROME_BROWSER_COCOA_BROWSER_WINDOW_H_