Chromium Code Reviews
Help | Chromium Project | Sign in
(21)

Side by Side Diff: chrome/browser/cocoa/menu_controller.mm

Issue 2762014: Mac: clang build (Closed)
Patch Set: more Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/menu_controller.h" 5 #import "chrome/browser/cocoa/menu_controller.h"
6 6
7 #include "app/l10n_util_mac.h" 7 #include "app/l10n_util_mac.h"
8 #include "app/menus/simple_menu_model.h" 8 #include "app/menus/simple_menu_model.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/sys_string_conversions.h" 10 #include "base/sys_string_conversions.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 135
136 // Called when the user chooses a particular menu item. |sender| is the menu 136 // Called when the user chooses a particular menu item. |sender| is the menu
137 // item chosen. 137 // item chosen.
138 - (void)itemSelected:(id)sender { 138 - (void)itemSelected:(id)sender {
139 NSInteger modelIndex = [sender tag]; 139 NSInteger modelIndex = [sender tag];
140 menus::MenuModel* model = 140 menus::MenuModel* model =
141 static_cast<menus::MenuModel*>( 141 static_cast<menus::MenuModel*>(
142 [[sender representedObject] pointerValue]); 142 [[sender representedObject] pointerValue]);
143 DCHECK(model); 143 DCHECK(model);
144 if (model); 144 if (model)
145 model->ActivatedAt(modelIndex); 145 model->ActivatedAt(modelIndex);
146 } 146 }
147 147
148 - (NSMenu*)menu { 148 - (NSMenu*)menu {
149 return menu_.get(); 149 return menu_.get();
150 } 150 }
151 151
152 @end 152 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/location_bar_view_mac.mm ('k') | chrome/browser/cocoa/preferences_window_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ec887be