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

Side by Side Diff: core/inspector/CodeGeneratorInspectorStrings.py

Issue 206333004: Update IDL to 1847 (Closed) Base URL: https://dart.googlecode.com/svn/third_party/WebCore
Patch Set: Add new files Created 6 years, 9 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 # Copyright (c) 2013 Google Inc. All rights reserved. 1 # Copyright (c) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * 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 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 #define InspectorBackendDispatcher_h 129 #define InspectorBackendDispatcher_h
130 130
131 #include "InspectorTypeBuilder.h" 131 #include "InspectorTypeBuilder.h"
132 132
133 #include "wtf/PassRefPtr.h" 133 #include "wtf/PassRefPtr.h"
134 #include "wtf/RefCounted.h" 134 #include "wtf/RefCounted.h"
135 #include "wtf/text/WTFString.h" 135 #include "wtf/text/WTFString.h"
136 136
137 namespace WebCore { 137 namespace WebCore {
138 138
139 class InspectorAgent;
140 class JSONObject; 139 class JSONObject;
141 class JSONArray; 140 class JSONArray;
142 class InspectorFrontendChannel; 141 class InspectorFrontendChannel;
143 142
144 typedef String ErrorString; 143 typedef String ErrorString;
145 144
146 class InspectorBackendDispatcherImpl; 145 class InspectorBackendDispatcherImpl;
147 146
148 class InspectorBackendDispatcher: public RefCounted<InspectorBackendDispatcher> { 147 class InspectorBackendDispatcher: public RefCounted<InspectorBackendDispatcher> {
149 public: 148 public:
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 207
209 208
210 """) 209 """)
211 210
212 backend_cpp = ( 211 backend_cpp = (
213 """ 212 """
214 213
215 #include "config.h" 214 #include "config.h"
216 #include "InspectorBackendDispatcher.h" 215 #include "InspectorBackendDispatcher.h"
217 216
218 #include "core/inspector/InspectorAgent.h"
219 #include "core/inspector/InspectorFrontendChannel.h" 217 #include "core/inspector/InspectorFrontendChannel.h"
220 #include "core/inspector/JSONParser.h" 218 #include "core/inspector/JSONParser.h"
221 #include "platform/JSONValues.h" 219 #include "platform/JSONValues.h"
222 #include "wtf/text/CString.h" 220 #include "wtf/text/CString.h"
223 #include "wtf/text/WTFString.h" 221 #include "wtf/text/WTFString.h"
224 222
225 namespace WebCore { 223 namespace WebCore {
226 224
227 const char InspectorBackendDispatcher::commandNames[] = { 225 const char InspectorBackendDispatcher::commandNames[] = {
228 $methodNameDeclarations 226 $methodNameDeclarations
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 281
284 void InspectorBackendDispatcherImpl::dispatch(const String& message) 282 void InspectorBackendDispatcherImpl::dispatch(const String& message)
285 { 283 {
286 RefPtr<InspectorBackendDispatcher> protect = this; 284 RefPtr<InspectorBackendDispatcher> protect = this;
287 typedef void (InspectorBackendDispatcherImpl::*CallHandler)(long callId, JSO NObject* messageObject); 285 typedef void (InspectorBackendDispatcherImpl::*CallHandler)(long callId, JSO NObject* messageObject);
288 typedef HashMap<String, CallHandler> DispatchMap; 286 typedef HashMap<String, CallHandler> DispatchMap;
289 DEFINE_STATIC_LOCAL(DispatchMap, dispatchMap, ); 287 DEFINE_STATIC_LOCAL(DispatchMap, dispatchMap, );
290 long callId = 0; 288 long callId = 0;
291 289
292 if (dispatchMap.isEmpty()) { 290 if (dispatchMap.isEmpty()) {
293 static CallHandler handlers[] = { 291 static const CallHandler handlers[] = {
294 $messageHandlers 292 $messageHandlers
295 }; 293 };
296 for (size_t i = 0; i < kMethodNamesEnumSize; ++i) 294 for (size_t i = 0; i < kMethodNamesEnumSize; ++i)
297 dispatchMap.add(commandName(static_cast<MethodNames>(i)), handlers[i ]); 295 dispatchMap.add(commandName(static_cast<MethodNames>(i)), handlers[i ]);
298 } 296 }
299 297
300 RefPtr<JSONValue> parsedMessage = parseJSON(message); 298 RefPtr<JSONValue> parsedMessage = parseJSON(message);
301 if (!parsedMessage) { 299 if (!parsedMessage) {
302 reportProtocolError(0, ParseError, "Message must be in JSON format"); 300 reportProtocolError(0, ParseError, "Message must be in JSON format");
303 return; 301 return;
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 }; 938 };
941 939
942 """) 940 """)
943 941
944 class_binding_builder_part_4 = ( 942 class_binding_builder_part_4 = (
945 """ static Builder<NoFieldsSet> create() 943 """ static Builder<NoFieldsSet> create()
946 { 944 {
947 return Builder<NoFieldsSet>(JSONObject::create()); 945 return Builder<NoFieldsSet>(JSONObject::create());
948 } 946 }
949 """) 947 """)
OLDNEW
« no previous file with comments | « core/inspector/CodeGeneratorInspector.py ('k') | core/inspector/CodeGeneratorInstrumentation.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698