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

Side by Side Diff: Source/bindings/v8/custom/V8InspectorFrontendHostCustom.cpp

Issue 24139004: Add toWebCoreString() / toWebCoreAtomicString() overloads taking a v8::String (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix bad if condition Created 7 years, 3 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
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 for (size_t i = 0; i < itemArray->Length(); ++i) { 67 for (size_t i = 0; i < itemArray->Length(); ++i) {
68 v8::Local<v8::Object> item = v8::Local<v8::Object>::Cast(itemArray->Get( i)); 68 v8::Local<v8::Object> item = v8::Local<v8::Object>::Cast(itemArray->Get( i));
69 v8::Local<v8::Value> type = item->Get(v8::String::NewSymbol("type")); 69 v8::Local<v8::Value> type = item->Get(v8::String::NewSymbol("type"));
70 v8::Local<v8::Value> id = item->Get(v8::String::NewSymbol("id")); 70 v8::Local<v8::Value> id = item->Get(v8::String::NewSymbol("id"));
71 v8::Local<v8::Value> label = item->Get(v8::String::NewSymbol("label")); 71 v8::Local<v8::Value> label = item->Get(v8::String::NewSymbol("label"));
72 v8::Local<v8::Value> enabled = item->Get(v8::String::NewSymbol("enabled" )); 72 v8::Local<v8::Value> enabled = item->Get(v8::String::NewSymbol("enabled" ));
73 v8::Local<v8::Value> checked = item->Get(v8::String::NewSymbol("checked" )); 73 v8::Local<v8::Value> checked = item->Get(v8::String::NewSymbol("checked" ));
74 v8::Local<v8::Value> subItems = item->Get(v8::String::NewSymbol("subItem s")); 74 v8::Local<v8::Value> subItems = item->Get(v8::String::NewSymbol("subItem s"));
75 if (!type->IsString()) 75 if (!type->IsString())
76 continue; 76 continue;
77 String typeString = toWebCoreStringWithNullCheck(type); 77 String typeString = toWebCoreStringWithNullCheck(type.As<v8::String>());
78 if (typeString == "separator") { 78 if (typeString == "separator") {
79 ContextMenuItem item(ContextMenuItem(SeparatorType, 79 ContextMenuItem item(ContextMenuItem(SeparatorType,
80 ContextMenuItemCustomTagNoAction, 80 ContextMenuItemCustomTagNoAction,
81 String())); 81 String()));
82 menu.appendItem(item); 82 menu.appendItem(item);
83 } else if (typeString == "subMenu" && subItems->IsArray()) { 83 } else if (typeString == "subMenu" && subItems->IsArray()) {
84 ContextMenu subMenu; 84 ContextMenu subMenu;
85 v8::Local<v8::Array> subItemsArray = v8::Local<v8::Array>::Cast(subI tems); 85 v8::Local<v8::Array> subItemsArray = v8::Local<v8::Array>::Cast(subI tems);
86 populateContextMenuItems(subItemsArray, subMenu); 86 populateContextMenuItems(subItemsArray, subMenu);
87 ContextMenuItem item(SubmenuType, 87 ContextMenuItem item(SubmenuType,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 histogramEnumeration("DevTools.PanelShown", args, 20); 143 histogramEnumeration("DevTools.PanelShown", args, 20);
144 } 144 }
145 145
146 void V8InspectorFrontendHost::recordSettingChangedMethodCustom(const v8::Functio nCallbackInfo<v8::Value>& args) 146 void V8InspectorFrontendHost::recordSettingChangedMethodCustom(const v8::Functio nCallbackInfo<v8::Value>& args)
147 { 147 {
148 histogramEnumeration("DevTools.SettingChanged", args, 100); 148 histogramEnumeration("DevTools.SettingChanged", args, 100);
149 } 149 }
150 150
151 } // namespace WebCore 151 } // namespace WebCore
152 152
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp ('k') | Source/bindings/v8/custom/V8WindowCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698