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

Side by Side Diff: webkit/glue/webmenurunner_mac.h

Issue 9703067: mac: Move EventWithMenuAction() to the only file where it's called. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « no previous file | webkit/glue/webmenurunner_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 WEBKIT_GLUE_WEBMENURUNNER_MAC_H_ 5 #ifndef WEBKIT_GLUE_WEBMENURUNNER_MAC_H_
6 #define WEBKIT_GLUE_WEBMENURUNNER_MAC_H_ 6 #define WEBKIT_GLUE_WEBMENURUNNER_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Returns the index of selected menu item, or its initial value (-1) if no item 55 // Returns the index of selected menu item, or its initial value (-1) if no item
56 // was selected. 56 // was selected.
57 - (int)indexOfSelectedItem; 57 - (int)indexOfSelectedItem;
58 58
59 @end // @interface WebMenuRunner 59 @end // @interface WebMenuRunner
60 60
61 namespace webkit_glue {
62 // Helper function for users of WebMenuRunner, for manufacturing input events to
63 // send to WebKit. If |item_chosen| is YES, we manufacture a mouse click event
64 // that corresponds to the menu item that was selected, |selected_index|, based
65 // on the position of the mouse click. Of |item_chosen| is NO, we create a
66 // keyboard event that simulates an ESC (menu dismissal) action. The event is
67 // designed to be sent to WebKit for processing by the PopupMenu class.
68 NSEvent* EventWithMenuAction(BOOL item_chosen, int window_num,
69 int item_height, int selected_index,
70 NSRect menu_bounds, NSRect view_bounds);
71 } // namespace webkit_glue
72
73 #endif // WEBKIT_GLUE_WEBMENURUNNER_MAC_H_ 61 #endif // WEBKIT_GLUE_WEBMENURUNNER_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/webmenurunner_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698