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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 for (size_t i = 0; i < itemArray->Length(); ++i) { | 62 for (size_t i = 0; i < itemArray->Length(); ++i) { |
63 v8::Local<v8::Object> item = v8::Local<v8::Object>::Cast(itemArray->Get(
i)); | 63 v8::Local<v8::Object> item = v8::Local<v8::Object>::Cast(itemArray->Get(
i)); |
64 v8::Local<v8::Value> type = item->Get(v8AtomicString(isolate, "type")); | 64 v8::Local<v8::Value> type = item->Get(v8AtomicString(isolate, "type")); |
65 v8::Local<v8::Value> id = item->Get(v8AtomicString(isolate, "id")); | 65 v8::Local<v8::Value> id = item->Get(v8AtomicString(isolate, "id")); |
66 v8::Local<v8::Value> label = item->Get(v8AtomicString(isolate, "label"))
; | 66 v8::Local<v8::Value> label = item->Get(v8AtomicString(isolate, "label"))
; |
67 v8::Local<v8::Value> enabled = item->Get(v8AtomicString(isolate, "enable
d")); | 67 v8::Local<v8::Value> enabled = item->Get(v8AtomicString(isolate, "enable
d")); |
68 v8::Local<v8::Value> checked = item->Get(v8AtomicString(isolate, "checke
d")); | 68 v8::Local<v8::Value> checked = item->Get(v8AtomicString(isolate, "checke
d")); |
69 v8::Local<v8::Value> subItems = item->Get(v8AtomicString(isolate, "subIt
ems")); | 69 v8::Local<v8::Value> subItems = item->Get(v8AtomicString(isolate, "subIt
ems")); |
70 if (!type->IsString()) | 70 if (!type->IsString()) |
71 continue; | 71 continue; |
72 String typeString = toWebCoreStringWithNullCheck(type.As<v8::String>()); | 72 String typeString = toCoreStringWithNullCheck(type.As<v8::String>()); |
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; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 histogramEnumeration("DevTools.PanelShown", info, 20); | 143 histogramEnumeration("DevTools.PanelShown", info, 20); |
144 } | 144 } |
145 | 145 |
146 void V8InspectorFrontendHost::recordSettingChangedMethodCustom(const v8::Functio
nCallbackInfo<v8::Value>& info) | 146 void V8InspectorFrontendHost::recordSettingChangedMethodCustom(const v8::Functio
nCallbackInfo<v8::Value>& info) |
147 { | 147 { |
148 histogramEnumeration("DevTools.SettingChanged", info, 100); | 148 histogramEnumeration("DevTools.SettingChanged", info, 100); |
149 } | 149 } |
150 | 150 |
151 } // namespace WebCore | 151 } // namespace WebCore |
152 | 152 |
OLD | NEW |