OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "webkit/glue/webmenurunner_mac.h" | 5 #include "webkit/glue/webmenurunner_mac.h" |
6 | 6 |
7 #include "base/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
8 | 8 |
9 @interface WebMenuRunner (PrivateAPI) | 9 @interface WebMenuRunner (PrivateAPI) |
10 | 10 |
11 // Worker function used during initialization. | 11 // Worker function used during initialization. |
12 - (void)addItem:(const WebMenuItem&)item; | 12 - (void)addItem:(const WebMenuItem&)item; |
13 | 13 |
14 // A callback for the menu controller object to call when an item is selected | 14 // A callback for the menu controller object to call when an item is selected |
15 // from the menu. This is not called if the menu is dismissed without a | 15 // from the menu. This is not called if the menu is dismissed without a |
16 // selection. | 16 // selection. |
17 - (void)menuItemSelected:(id)sender; | 17 - (void)menuItemSelected:(id)sender; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 138 |
139 if ([self menuItemWasChosen]) | 139 if ([self menuItemWasChosen]) |
140 index_ = [cell indexOfSelectedItem]; | 140 index_ = [cell indexOfSelectedItem]; |
141 } | 141 } |
142 | 142 |
143 - (int)indexOfSelectedItem { | 143 - (int)indexOfSelectedItem { |
144 return index_; | 144 return index_; |
145 } | 145 } |
146 | 146 |
147 @end // WebMenuRunner | 147 @end // WebMenuRunner |
OLD | NEW |