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

Side by Side Diff: Source/WebCore/platform/ContextMenuItem.cpp

Issue 14185003: Use ContextMenu code path that was guarded by CROSS_PLATFORM_CONTEXT_MENU (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use ContextMenu code path that was guarded by CROSS_PLATFORM_CONTEXT_MENU Created 7 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 10 matching lines...) Expand all
21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23 * THE POSSIBILITY OF SUCH DAMAGE. 23 * THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "config.h" 26 #include "config.h"
27 #include "ContextMenuItem.h" 27 #include "ContextMenuItem.h"
28 28
29 #include "ContextMenu.h" 29 #include "ContextMenu.h"
30 30
31 #if ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS) 31 #if ENABLE(CONTEXT_MENUS)
32 32
33 namespace WebCore { 33 namespace WebCore {
34 34
35 ContextMenuItem::ContextMenuItem(ContextMenuItemType type, ContextMenuAction act ion, const String& title, ContextMenu* subMenu) 35 ContextMenuItem::ContextMenuItem(ContextMenuItemType type, ContextMenuAction act ion, const String& title, ContextMenu* subMenu)
36 : m_type(type) 36 : m_type(type)
37 , m_action(action) 37 , m_action(action)
38 , m_title(title) 38 , m_title(title)
39 , m_enabled(true) 39 , m_enabled(true)
40 , m_checked(false) 40 , m_checked(false)
41 { 41 {
42 if (subMenu) 42 if (subMenu)
43 setSubMenu(subMenu); 43 setSubMenu(subMenu);
44 } 44 }
45 45
46 ContextMenuItem::ContextMenuItem(ContextMenuItemType type, ContextMenuAction act ion, const String& title, bool enabled, bool checked) 46 ContextMenuItem::ContextMenuItem(ContextMenuItemType type, ContextMenuAction act ion, const String& title, bool enabled, bool checked)
47 : m_type(type) 47 : m_type(type)
48 , m_action(action) 48 , m_action(action)
49 , m_title(title) 49 , m_title(title)
50 , m_enabled(enabled) 50 , m_enabled(enabled)
51 , m_checked(checked) 51 , m_checked(checked)
52 { 52 {
53 } 53 }
54 54
55 ContextMenuItem::ContextMenuItem(ContextMenuAction action, const String& title, bool enabled, bool checked, const Vector<ContextMenuItem>& subMenuItems) 55 ContextMenuItem::ContextMenuItem(ContextMenuAction action, const String& title, bool enabled, bool checked, const Vector<ContextMenuItem>& subMenuItems)
56 : m_type(SubmenuType) 56 : m_type(SubmenuType)
57 , m_action(action) 57 , m_action(action)
58 , m_title(title) 58 , m_title(title)
59 , m_enabled(enabled) 59 , m_enabled(enabled)
60 , m_checked(checked) 60 , m_checked(checked)
61 , m_subMenuItems(subMenuItems) 61 , m_subMenuItems(subMenuItems)
62 { 62 {
63 } 63 }
64 64
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 m_enabled = enabled; 112 m_enabled = enabled;
113 } 113 }
114 114
115 bool ContextMenuItem::enabled() const 115 bool ContextMenuItem::enabled() const
116 { 116 {
117 return m_enabled; 117 return m_enabled;
118 } 118 }
119 119
120 } // namespace WebCore 120 } // namespace WebCore
121 121
122 #endif // ENABLE(CONTEXT_MENUS) && USE(CROSS_PLATFORM_CONTEXT_MENUS) 122 #endif // ENABLE(CONTEXT_MENUS)
OLDNEW
« no previous file with comments | « Source/WebCore/platform/ContextMenuItem.h ('k') | Source/WebCore/platform/PlatformMenuDescription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698