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

Unified Diff: chrome/browser/cocoa/menu_controller.mm

Issue 500030: Factor tab context menu into a shared model and fix mac and win to use it. Im... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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/cocoa/menu_controller.mm
===================================================================
--- chrome/browser/cocoa/menu_controller.mm (revision 34596)
+++ chrome/browser/cocoa/menu_controller.mm (working copy)
@@ -96,7 +96,8 @@
// The MenuModel works on indexes so we can't just set the command id as the
// tag like we do in other menus. Also set the represented object to be
// the model so hierarchical menus check the correct index in the correct
- // model.
+ // model. Setting the target to |self| allows this class to participate
+ // in validation of the menu items.
[item setTag:modelIndex];
[item setTarget:self];
NSValue* modelObject = [NSValue valueWithPointer:model];

Powered by Google App Engine
This is Rietveld 408576698