OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-2009 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 if (typeString == "separator") { | 73 if (typeString == "separator") { |
74 ContextMenuItem item(ContextMenuItem(SeparatorType, | 74 ContextMenuItem item(ContextMenuItem(SeparatorType, |
75 ContextMenuItemCustomTagNoAction, | 75 ContextMenuItemCustomTagNoAction, |
76 String())); | 76 String())); |
77 menu.appendItem(item); | 77 menu.appendItem(item); |
78 } else if (typeString == "subMenu" && subItems->IsArray()) { | 78 } else if (typeString == "subMenu" && subItems->IsArray()) { |
79 ContextMenu subMenu; | 79 ContextMenu subMenu; |
80 v8::Local<v8::Array> subItemsArray = v8::Local<v8::Array>::Cast(subI
tems); | 80 v8::Local<v8::Array> subItemsArray = v8::Local<v8::Array>::Cast(subI
tems); |
81 if (!populateContextMenuItems(subItemsArray, subMenu, isolate)) | 81 if (!populateContextMenuItems(subItemsArray, subMenu, isolate)) |
82 return false; | 82 return false; |
83 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<WithNullChec
k>, labelString, label, false); | 83 TOSTRING_BOOL_BOOL(V8StringResource<WithNullCheck>, labelString, lab
el, false); |
84 ContextMenuItem item(SubmenuType, | 84 ContextMenuItem item(SubmenuType, |
85 ContextMenuItemCustomTagNoAction, | 85 ContextMenuItemCustomTagNoAction, |
86 labelString, | 86 labelString, |
87 &subMenu); | 87 &subMenu); |
88 menu.appendItem(item); | 88 menu.appendItem(item); |
89 } else { | 89 } else { |
90 ContextMenuAction typedId = static_cast<ContextMenuAction>(ContextMe
nuItemBaseCustomTag + id->ToInt32()->Value()); | 90 ContextMenuAction typedId = static_cast<ContextMenuAction>(ContextMe
nuItemBaseCustomTag + id->ToInt32()->Value()); |
91 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<WithNullChec
k>, labelString, label, false); | 91 TOSTRING_BOOL_BOOL(V8StringResource<WithNullCheck>, labelString, lab
el, false); |
92 ContextMenuItem menuItem((typeString == "checkbox" ? CheckableAction
Type : ActionType), typedId, labelString); | 92 ContextMenuItem menuItem((typeString == "checkbox" ? CheckableAction
Type : ActionType), typedId, labelString); |
93 if (checked->IsBoolean()) | 93 if (checked->IsBoolean()) |
94 menuItem.setChecked(checked->ToBoolean()->Value()); | 94 menuItem.setChecked(checked->ToBoolean()->Value()); |
95 if (enabled->IsBoolean()) | 95 if (enabled->IsBoolean()) |
96 menuItem.setEnabled(enabled->ToBoolean()->Value()); | 96 menuItem.setEnabled(enabled->ToBoolean()->Value()); |
97 menu.appendItem(menuItem); | 97 menu.appendItem(menuItem); |
98 } | 98 } |
99 } | 99 } |
100 return true; | 100 return true; |
101 } | 101 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 histogramEnumeration("DevTools.ActionTaken", info, 100); | 138 histogramEnumeration("DevTools.ActionTaken", info, 100); |
139 } | 139 } |
140 | 140 |
141 void V8InspectorFrontendHost::recordPanelShownMethodCustom(const v8::FunctionCal
lbackInfo<v8::Value>& info) | 141 void V8InspectorFrontendHost::recordPanelShownMethodCustom(const v8::FunctionCal
lbackInfo<v8::Value>& info) |
142 { | 142 { |
143 histogramEnumeration("DevTools.PanelShown", info, 20); | 143 histogramEnumeration("DevTools.PanelShown", info, 20); |
144 } | 144 } |
145 | 145 |
146 } // namespace WebCore | 146 } // namespace WebCore |
147 | 147 |
OLD | NEW |