diff options
author | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-10 03:03:09 +0000 |
---|---|---|
committer | paulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-10 03:03:09 +0000 |
commit | 3f64e5af06d2506e1e9886fc834775f2169f21be (patch) | |
tree | 6a23effda23684362a666dc02efa3a337fd40f3c /webkit/glue/webwidget_delegate.h | |
parent | 1f73c7ff048b6735e5cf2c36d77ac0cd175d5fb8 (diff) | |
download | chromium_src-3f64e5af06d2506e1e9886fc834775f2169f21be.zip chromium_src-3f64e5af06d2506e1e9886fc834775f2169f21be.tar.gz chromium_src-3f64e5af06d2506e1e9886fc834775f2169f21be.tar.bz2 |
Chrome side of the WebKit popup changes.
Implements HTML select popups on Mac OS X as
native Cocoa controls.
BUG=5095 (http://crbug.com/5095)
Review URL: http://codereview.chromium.org/67018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13495 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webwidget_delegate.h')
-rw-r--r-- | webkit/glue/webwidget_delegate.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/webkit/glue/webwidget_delegate.h b/webkit/glue/webwidget_delegate.h index e6d95b0..5b8fbbd0 100644 --- a/webkit/glue/webwidget_delegate.h +++ b/webkit/glue/webwidget_delegate.h @@ -21,7 +21,7 @@ class WebWidget; class WebCursor; struct WebPluginGeometry; -struct MenuItem { +struct WebMenuItem { // Container for information about entries in an HTML select popup menu. // Types must be kept in sync with PopupListBox::ListItemType in // WebCore/platform/chromium/PopupMenuChromium.h. This won't change often @@ -57,21 +57,20 @@ class WebWidgetDelegate { // window should be displayed, but generally only means something for WebViews. virtual void Show(WebWidget* webwidget, WindowOpenDisposition disposition) = 0; - // Used for displaying HTML select elements as popup menus on Mac OS X (other - // platforms will use Show() above). |bounds| represents the positioning on - // the screen (in WebKit coordinates, origin at the top left corner) of the - // button that will display the menu. It will be used, along with - // |item_height| (which refers to the size of each entry in the menu), to - // position the menu on the screen. |selected_index| indicates the menu item - // that should be drawn as selected when the menu initially is displayed. - // |items| contains information about each of the entries in the popup menu, - // such as the type (separator, option, group), the text representation and - // the item's enabled status. - virtual void ShowWithItems(WebWidget* webwidget, - const WebKit::WebRect& bounds, - int item_height, - int selected_index, - const std::vector<MenuItem>& items) = 0; + // Used for displaying HTML popup menus on Mac OS X (other platforms will use + // Show() above). |bounds| represents the positioning on the screen (in WebKit + // coordinates, origin at the top left corner) of the button that will display + // the menu. It will be used, along with |item_height| (which refers to the + // size of each entry in the menu), to position the menu on the screen. + // |selected_index| indicates the menu item that should be drawn as selected + // when the menu initially is displayed. |items| contains information about + // each of the entries in the popup menu, such as the type (separator, option, + // group), the text representation and the item's enabled status. + virtual void ShowAsPopupWithItems(WebWidget* webwidget, + const WebKit::WebRect& bounds, + int item_height, + int selected_index, + const std::vector<WebMenuItem>& items) = 0; // This method is called to instruct the window containing the WebWidget to // close. Note: This method should just be the trigger that causes the |