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

Unified Diff: chrome/browser/tab_contents/tab_contents_view_mac.mm

Issue 271054: Send key equivalents to renderer first, sendEvent-based. (Closed)
Patch Set: speling Created 11 years, 2 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
« no previous file with comments | « chrome/browser/cocoa/chrome_browser_window.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents_view_mac.mm
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm
index 03baffc6fe004848ad63cf3614ab5e4eca084361..2a80f22cebf16400445898d01278a8fe1ef0bea8 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm
@@ -294,6 +294,12 @@ void TabContentsViewMac::Observe(NotificationType type,
}
- (void)processKeyboardEvent:(NSEvent*)event {
+ if ([event type] == NSKeyDown && ([event modifierFlags] & NSCommandKeyMask)) {
+ // We need to dispatch this to the menu.
+ if ([[NSApp mainMenu] performKeyEquivalent:event])
+ return;
+ }
+
// If this tab is no longer active, it's window will be |nil|. In that case,
// best ignore the event.
if (![self window])
« no previous file with comments | « chrome/browser/cocoa/chrome_browser_window.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698