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

Side by Side Diff: third_party/WebKit/Source/platform/ContextMenuItem.cpp

Issue 2905763003: Rollback ContextMenu (Closed)
Patch Set: Rebase Created 3 years, 6 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 14 matching lines...) Expand all
25 25
26 #include "platform/ContextMenuItem.h" 26 #include "platform/ContextMenuItem.h"
27 27
28 #include "platform/ContextMenu.h" 28 #include "platform/ContextMenu.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 ContextMenuItem::ContextMenuItem(ContextMenuItemType type, 32 ContextMenuItem::ContextMenuItem(ContextMenuItemType type,
33 ContextMenuAction action, 33 ContextMenuAction action,
34 const String& title, 34 const String& title,
35 const String& icon,
36 ContextMenu* sub_menu) 35 ContextMenu* sub_menu)
37 : type_(type), 36 : type_(type),
38 action_(action), 37 action_(action),
39 title_(title), 38 title_(title),
40 icon_(icon),
41 enabled_(true), 39 enabled_(true),
42 checked_(false) { 40 checked_(false) {
43 if (sub_menu) 41 if (sub_menu)
44 SetSubMenu(sub_menu); 42 SetSubMenu(sub_menu);
45 } 43 }
46 44
47 ContextMenuItem::ContextMenuItem(ContextMenuItemType type, 45 ContextMenuItem::ContextMenuItem(ContextMenuItemType type,
48 ContextMenuAction action, 46 ContextMenuAction action,
49 const String& title, 47 const String& title,
50 const String& icon,
51 bool enabled, 48 bool enabled,
52 bool checked) 49 bool checked)
53 : type_(type), 50 : type_(type),
54 action_(action), 51 action_(action),
55 title_(title), 52 title_(title),
56 icon_(icon),
57 enabled_(enabled), 53 enabled_(enabled),
58 checked_(checked) {} 54 checked_(checked) {}
59 55
60 ContextMenuItem::ContextMenuItem(ContextMenuAction action, 56 ContextMenuItem::ContextMenuItem(ContextMenuAction action,
61 const String& title, 57 const String& title,
62 bool enabled, 58 bool enabled,
63 bool checked, 59 bool checked,
64 const Vector<ContextMenuItem>& sub_menu_items) 60 const Vector<ContextMenuItem>& sub_menu_items)
65 : type_(kSubmenuType), 61 : type_(kSubmenuType),
66 action_(action), 62 action_(action),
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 103
108 void ContextMenuItem::SetEnabled(bool enabled) { 104 void ContextMenuItem::SetEnabled(bool enabled) {
109 enabled_ = enabled; 105 enabled_ = enabled;
110 } 106 }
111 107
112 bool ContextMenuItem::Enabled() const { 108 bool ContextMenuItem::Enabled() const {
113 return enabled_; 109 return enabled_;
114 } 110 }
115 111
116 } // namespace blink 112 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/ContextMenuItem.h ('k') | third_party/WebKit/Source/web/ContextMenuClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698