| 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_PUBLIC_COMMON_MENU_ITEM_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_MENU_ITEM_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_MENU_ITEM_H_ | 6 #define CONTENT_PUBLIC_COMMON_MENU_ITEM_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "third_party/WebKit/public/web/WebMenuItemInfo.h" | 12 #include "third_party/WebKit/public/web/WebMenuItemInfo.h" |
| 13 #include "url/gurl.h" |
| 13 | 14 |
| 14 namespace content { | 15 namespace content { |
| 15 | 16 |
| 16 // Container for information about entries in an HTML select popup menu and | 17 // Container for information about entries in an HTML select popup menu and |
| 17 // custom entries of the context menu. | 18 // custom entries of the context menu. |
| 18 struct CONTENT_EXPORT MenuItem { | 19 struct CONTENT_EXPORT MenuItem { |
| 19 enum Type { | 20 enum Type { |
| 20 OPTION = blink::WebMenuItemInfo::Option, | 21 OPTION = blink::WebMenuItemInfo::Option, |
| 21 CHECKABLE_OPTION = blink::WebMenuItemInfo::CheckableOption, | 22 CHECKABLE_OPTION = blink::WebMenuItemInfo::CheckableOption, |
| 22 GROUP = blink::WebMenuItemInfo::Group, | 23 GROUP = blink::WebMenuItemInfo::Group, |
| 23 SEPARATOR = blink::WebMenuItemInfo::Separator, | 24 SEPARATOR = blink::WebMenuItemInfo::Separator, |
| 24 SUBMENU // This is currently only used by Pepper, not by WebKit. | 25 SUBMENU // This is currently only used by Pepper, not by WebKit. |
| 25 }; | 26 }; |
| 26 | 27 |
| 27 MenuItem(); | 28 MenuItem(); |
| 28 MenuItem(const MenuItem& item); | 29 MenuItem(const MenuItem& item); |
| 29 ~MenuItem(); | 30 ~MenuItem(); |
| 30 | 31 |
| 31 base::string16 label; | 32 base::string16 label; |
| 32 base::string16 icon; | 33 GURL icon; |
| 33 base::string16 tool_tip; | 34 base::string16 tool_tip; |
| 34 Type type; | 35 Type type; |
| 35 unsigned action; | 36 unsigned action; |
| 36 bool rtl; | 37 bool rtl; |
| 37 bool has_directional_override; | 38 bool has_directional_override; |
| 38 bool enabled; | 39 bool enabled; |
| 39 bool checked; | 40 bool checked; |
| 40 std::vector<MenuItem> submenu; | 41 std::vector<MenuItem> submenu; |
| 41 }; | 42 }; |
| 42 | 43 |
| 43 } // namespace content | 44 } // namespace content |
| 44 | 45 |
| 45 #endif // CONTENT_PUBLIC_COMMON_MENU_ITEM_H_ | 46 #endif // CONTENT_PUBLIC_COMMON_MENU_ITEM_H_ |
| OLD | NEW |