OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 WEBMENUITEM_H_ | 5 #ifndef WEBMENUITEM_H_ |
6 #define WEBMENUITEM_H_ | 6 #define WEBMENUITEM_H_ |
7 | 7 |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "webkit/api/public/WebPopupMenuInfo.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenuInfo.h" |
10 | 10 |
11 // Container for information about entries in an HTML select popup menu. | 11 // Container for information about entries in an HTML select popup menu. |
12 struct WebMenuItem { | 12 struct WebMenuItem { |
13 enum Type { | 13 enum Type { |
14 OPTION = WebKit::WebPopupMenuInfo::Item::Option, | 14 OPTION = WebKit::WebPopupMenuInfo::Item::Option, |
15 GROUP = WebKit::WebPopupMenuInfo::Item::Group, | 15 GROUP = WebKit::WebPopupMenuInfo::Item::Group, |
16 SEPARATOR = WebKit::WebPopupMenuInfo::Item::Separator | 16 SEPARATOR = WebKit::WebPopupMenuInfo::Item::Separator |
17 }; | 17 }; |
18 | 18 |
19 string16 label; | 19 string16 label; |
20 Type type; | 20 Type type; |
21 bool enabled; | 21 bool enabled; |
22 | 22 |
23 WebMenuItem() : type(OPTION), enabled(false) { | 23 WebMenuItem() : type(OPTION), enabled(false) { |
24 } | 24 } |
25 | 25 |
26 WebMenuItem(const WebKit::WebPopupMenuInfo::Item& item) | 26 WebMenuItem(const WebKit::WebPopupMenuInfo::Item& item) |
27 : label(item.label), | 27 : label(item.label), |
28 type(static_cast<Type>(item.type)), | 28 type(static_cast<Type>(item.type)), |
29 enabled(item.enabled) { | 29 enabled(item.enabled) { |
30 } | 30 } |
31 }; | 31 }; |
32 | 32 |
33 #endif // WEBMENUITEM_H_ | 33 #endif // WEBMENUITEM_H_ |
OLD | NEW |