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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/back_forward_menu_controller.mm

Issue 6893046: added CTRL+Click and SHIFT+Click handler for context menu, Back and Forward. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: make this patch applicable to the latest trunk Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/cocoa/event_utils_unittest.mm ('k') | chrome/browser/ui/gtk/gtk_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/toolbar/back_forward_menu_controller.h" 5 #import "chrome/browser/ui/cocoa/toolbar/back_forward_menu_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #import "chrome/browser/ui/cocoa/event_utils.h" 10 #import "chrome/browser/ui/cocoa/event_utils.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 [menuItem setAction:@selector(executeMenuItem:)]; 83 [menuItem setAction:@selector(executeMenuItem:)];
84 84
85 // Put it in the menu! 85 // Put it in the menu!
86 [menu insertItem:menuItem 86 [menu insertItem:menuItem
87 atIndex:(menuID + 1)]; 87 atIndex:(menuID + 1)];
88 } 88 }
89 } 89 }
90 } 90 }
91 91
92 // Action methods: 92 // Action methods:
93
94 - (void)executeMenuItem:(id)sender { 93 - (void)executeMenuItem:(id)sender {
95 DCHECK([sender isKindOfClass:[NSMenuItem class]]); 94 DCHECK([sender isKindOfClass:[NSMenuItem class]]);
96 int menuID = [sender tag]; 95 int menuID = [sender tag];
97 model_->ActivatedAtWithDisposition( 96 model_->ActivatedAtWithFlags(
98 menuID, 97 menuID,
99 event_utils::WindowOpenDispositionFromNSEvent([NSApp currentEvent])); 98 event_utils::EventFlagsFromNSEvent([NSApp currentEvent]));
100 } 99 }
101 100
102 @end // @implementation BackForwardMenuController 101 @end // @implementation BackForwardMenuController
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/event_utils_unittest.mm ('k') | chrome/browser/ui/gtk/gtk_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698