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

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

Issue 6253017: Pepper/Flapper: First pass at context menu implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make brettw happier Created 9 years, 10 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 | « webkit/glue/webkit_glue.gypi ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('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) 2009 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 WEBMENUITEM_H_ 5 #ifndef WEBMENUITEM_H_
6 #define WEBMENUITEM_H_ 6 #define WEBMENUITEM_H_
7 7
8 #include <vector>
9
8 #include "base/string16.h" 10 #include "base/string16.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMenuItemInfo.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMenuItemInfo.h"
10 12
11 // Container for information about entries in an HTML select popup menu and 13 // Container for information about entries in an HTML select popup menu and
12 // custom entries of the context menu. 14 // custom entries of the context menu.
13 struct WebMenuItem { 15 struct WebMenuItem {
14 enum Type { 16 enum Type {
15 OPTION = WebKit::WebMenuItemInfo::Option, 17 OPTION = WebKit::WebMenuItemInfo::Option,
16 CHECKABLE_OPTION = WebKit::WebMenuItemInfo::CheckableOption, 18 CHECKABLE_OPTION = WebKit::WebMenuItemInfo::CheckableOption,
17 GROUP = WebKit::WebMenuItemInfo::Group, 19 GROUP = WebKit::WebMenuItemInfo::Group,
18 SEPARATOR = WebKit::WebMenuItemInfo::Separator 20 SEPARATOR = WebKit::WebMenuItemInfo::Separator,
21 SUBMENU // This is currently only used by Pepper, not by WebKit.
19 }; 22 };
20 23
21 string16 label; 24 string16 label;
22 Type type; 25 Type type;
23 unsigned action; 26 unsigned action;
24 bool enabled; 27 bool enabled;
25 bool checked; 28 bool checked;
29 std::vector<WebMenuItem> submenu;
26 30
27 WebMenuItem() : type(OPTION), action(0), enabled(false), checked(false) { 31 WebMenuItem() : type(OPTION), action(0), enabled(false), checked(false) {
28 } 32 }
29 33
30 WebMenuItem(const WebKit::WebMenuItemInfo& item) 34 WebMenuItem(const WebKit::WebMenuItemInfo& item)
31 : label(item.label), 35 : label(item.label),
32 type(static_cast<Type>(item.type)), 36 type(static_cast<Type>(item.type)),
33 action(item.action), 37 action(item.action),
34 enabled(item.enabled), 38 enabled(item.enabled),
35 checked(item.checked) { 39 checked(item.checked) {
36 } 40 }
37 }; 41 };
38 42
39 #endif // WEBMENUITEM_H_ 43 #endif // WEBMENUITEM_H_
OLDNEW
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/plugins/ppapi/mock_plugin_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698