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

Side by Side Diff: content/browser/renderer_host/webmenurunner_mac.mm

Issue 197533008: Mac: ExternalPopupMenu::close should hide a showing popup menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: alignment Created 6 years, 9 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
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698