summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webmenuitem.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-14 16:32:59 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-14 16:32:59 +0000
commit88efb7ec99239eeecaa17d21f8635be1bce29cca (patch)
treeb1a988fbca10748e584f78abb755036e63ff335f /webkit/glue/webmenuitem.h
parentc9d6a1df8ef5fd2c3f134dcb544663ce8bd21c7b (diff)
downloadchromium_src-88efb7ec99239eeecaa17d21f8635be1bce29cca.zip
chromium_src-88efb7ec99239eeecaa17d21f8635be1bce29cca.tar.gz
chromium_src-88efb7ec99239eeecaa17d21f8635be1bce29cca.tar.bz2
Replace ShowAsPopupWithItems to CreatePopupWidgetWithInfo. Also,
make use of WebPopupMenuInfo from the WebKit API. WebMenuItem remains in webkit/glue for convenience with IPC marshalling and related usage in Chrome. This work is precursor to switching over to using WebWidget from the WebKit API. BUG=16234 TEST=html select drop downs should still work on the mac. try switching languages on news.google.com. R=paul Review URL: http://codereview.chromium.org/155378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20624 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webmenuitem.h')
-rw-r--r--webkit/glue/webmenuitem.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/webkit/glue/webmenuitem.h b/webkit/glue/webmenuitem.h
new file mode 100644
index 0000000..584e071
--- /dev/null
+++ b/webkit/glue/webmenuitem.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBMENUITEM_H_
+#define WEBMENUITEM_H_
+
+#include "base/string16.h"
+#include "webkit/api/public/WebPopupMenuInfo.h"
+
+// Container for information about entries in an HTML select popup menu.
+struct WebMenuItem {
+ enum Type {
+ OPTION = WebKit::WebPopupMenuInfo::Item::Option,
+ GROUP = WebKit::WebPopupMenuInfo::Item::Group,
+ SEPARATOR = WebKit::WebPopupMenuInfo::Item::Separator
+ };
+
+ string16 label;
+ Type type;
+ bool enabled;
+
+ WebMenuItem() : type(OPTION), enabled(false) {
+ }
+
+ WebMenuItem(const WebKit::WebPopupMenuInfo::Item& item)
+ : label(item.label),
+ type(static_cast<Type>(item.type)),
+ enabled(item.enabled) {
+ }
+};
+
+#endif // WEBMENUITEM_H_