| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/renderer_host/webmenurunner_mac.h" | 5 #include "content/browser/renderer_host/webmenurunner_mac.h" |
| 6 | 6 |
| 7 #include "base/strings/sys_string_conversions.h" | 7 #include "base/strings/sys_string_conversions.h" |
| 8 | 8 |
| 9 @interface WebMenuRunner (PrivateAPI) | 9 @interface WebMenuRunner (PrivateAPI) |
| 10 | 10 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // Display the menu, and set a flag if a menu item was chosen. | 141 // Display the menu, and set a flag if a menu item was chosen. |
| 142 [cell attachPopUpWithFrame:[dummyView bounds] inView:dummyView]; | 142 [cell attachPopUpWithFrame:[dummyView bounds] inView:dummyView]; |
| 143 [cell performClickWithFrame:[dummyView bounds] inView:dummyView]; | 143 [cell performClickWithFrame:[dummyView bounds] inView:dummyView]; |
| 144 | 144 |
| 145 [dummyView removeFromSuperview]; | 145 [dummyView removeFromSuperview]; |
| 146 | 146 |
| 147 if ([self menuItemWasChosen]) | 147 if ([self menuItemWasChosen]) |
| 148 index_ = [cell indexOfSelectedItem]; | 148 index_ = [cell indexOfSelectedItem]; |
| 149 } | 149 } |
| 150 | 150 |
| 151 - (void)hide { |
| 152 [menu_ cancelTracking]; |
| 153 } |
| 154 |
| 151 - (int)indexOfSelectedItem { | 155 - (int)indexOfSelectedItem { |
| 152 return index_; | 156 return index_; |
| 153 } | 157 } |
| 154 | 158 |
| 155 @end // WebMenuRunner | 159 @end // WebMenuRunner |
| OLD | NEW |