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

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

Issue 10411002: Implement the Chromium-specific part of WebCore context menus with submenus (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unneeded change Created 8 years, 7 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 | « no previous file | no next file » | 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) 2011 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 #include "webkit/glue/webmenuitem.h" 5 #include "webkit/glue/webmenuitem.h"
6 6
7 WebMenuItem::WebMenuItem() 7 WebMenuItem::WebMenuItem()
8 : type(OPTION), 8 : type(OPTION),
9 action(0), 9 action(0),
10 rtl(false), 10 rtl(false),
11 has_directional_override(false), 11 has_directional_override(false),
12 enabled(false), 12 enabled(false),
13 checked(false) { 13 checked(false) {
14 } 14 }
15 15
16 WebMenuItem::WebMenuItem(const WebKit::WebMenuItemInfo& item) 16 WebMenuItem::WebMenuItem(const WebKit::WebMenuItemInfo& item)
17 : label(item.label), 17 : label(item.label),
18 toolTip(item.toolTip), 18 toolTip(item.toolTip),
19 type(static_cast<Type>(item.type)), 19 type(static_cast<Type>(item.type)),
20 action(item.action), 20 action(item.action),
21 rtl(item.textDirection == WebKit::WebTextDirectionRightToLeft), 21 rtl(item.textDirection == WebKit::WebTextDirectionRightToLeft),
22 has_directional_override(item.hasTextDirectionOverride), 22 has_directional_override(item.hasTextDirectionOverride),
23 enabled(item.enabled), 23 enabled(item.enabled),
24 checked(item.checked) { 24 checked(item.checked) {
25 for (size_t i = 0; i < item.subMenuItems.size(); ++i)
26 submenu.push_back(WebMenuItem(item.subMenuItems[i]));
25 } 27 }
26 28
27 WebMenuItem::WebMenuItem(const WebMenuItem& item) 29 WebMenuItem::WebMenuItem(const WebMenuItem& item)
28 : label(item.label), 30 : label(item.label),
29 toolTip(item.toolTip), 31 toolTip(item.toolTip),
30 type(item.type), 32 type(item.type),
31 action(item.action), 33 action(item.action),
32 rtl(item.rtl), 34 rtl(item.rtl),
33 has_directional_override(item.has_directional_override), 35 has_directional_override(item.has_directional_override),
34 enabled(item.enabled), 36 enabled(item.enabled),
35 checked(item.checked), 37 checked(item.checked),
36 submenu(item.submenu) { 38 submenu(item.submenu) {
37 } 39 }
38 40
39 WebMenuItem::~WebMenuItem() {} 41 WebMenuItem::~WebMenuItem() {}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698