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 #ifndef CONTENT_BROWSER_RENDERER_HOST_WEBMENURUNNER_MAC_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_WEBMENURUNNER_MAC_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_WEBMENURUNNER_MAC_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_WEBMENURUNNER_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Returns YES if an item was selected from the menu, NO if the menu was | 46 // Returns YES if an item was selected from the menu, NO if the menu was |
47 // dismissed. | 47 // dismissed. |
48 - (BOOL)menuItemWasChosen; | 48 - (BOOL)menuItemWasChosen; |
49 | 49 |
50 // Displays and runs a native popup menu. | 50 // Displays and runs a native popup menu. |
51 - (void)runMenuInView:(NSView*)view | 51 - (void)runMenuInView:(NSView*)view |
52 withBounds:(NSRect)bounds | 52 withBounds:(NSRect)bounds |
53 initialIndex:(int)index; | 53 initialIndex:(int)index; |
54 | 54 |
| 55 // Hides a popup menu if it's visible. |
| 56 - (void)hide; |
| 57 |
55 // Returns the index of selected menu item, or its initial value (-1) if no item | 58 // Returns the index of selected menu item, or its initial value (-1) if no item |
56 // was selected. | 59 // was selected. |
57 - (int)indexOfSelectedItem; | 60 - (int)indexOfSelectedItem; |
58 | 61 |
59 @end // @interface WebMenuRunner | 62 @end // @interface WebMenuRunner |
60 | 63 |
61 #endif // CONTENT_BROWSER_RENDERER_HOST_WEBMENURUNNER_MAC_H_ | 64 #endif // CONTENT_BROWSER_RENDERER_HOST_WEBMENURUNNER_MAC_H_ |
OLD | NEW |