OLD | NEW |
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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 enum MethodNames { | 191 enum MethodNames { |
192 $methodNamesEnumContent | 192 $methodNamesEnumContent |
193 | 193 |
194 kMethodNamesEnumSize | 194 kMethodNamesEnumSize |
195 }; | 195 }; |
196 | 196 |
197 static const char* commandName(MethodNames); | 197 static const char* commandName(MethodNames); |
198 | 198 |
199 private: | 199 private: |
200 static const char commandNames[]; | 200 static const char commandNames[]; |
201 static const size_t commandNamesIndex[]; | 201 static const unsigned short commandNamesIndex[]; |
202 }; | 202 }; |
203 | 203 |
204 } // namespace blink | 204 } // namespace blink |
205 #endif // !defined(InspectorBackendDispatcher_h) | 205 #endif // !defined(InspectorBackendDispatcher_h) |
206 | 206 |
207 | 207 |
208 """) | 208 """) |
209 | 209 |
210 backend_cpp = ( | 210 backend_cpp = ( |
211 """ | 211 """ |
212 | 212 |
213 #include "config.h" | 213 #include "config.h" |
214 #include "InspectorBackendDispatcher.h" | 214 #include "InspectorBackendDispatcher.h" |
215 | 215 |
216 #include "core/inspector/InspectorFrontendChannel.h" | 216 #include "core/inspector/InspectorFrontendChannel.h" |
217 #include "core/inspector/JSONParser.h" | 217 #include "core/inspector/JSONParser.h" |
218 #include "platform/JSONValues.h" | 218 #include "platform/JSONValues.h" |
219 #include "wtf/text/CString.h" | 219 #include "wtf/text/CString.h" |
220 #include "wtf/text/WTFString.h" | 220 #include "wtf/text/WTFString.h" |
221 | 221 |
222 namespace blink { | 222 namespace blink { |
223 | 223 |
224 const char InspectorBackendDispatcher::commandNames[] = { | 224 const char InspectorBackendDispatcher::commandNames[] = { |
225 $methodNameDeclarations | 225 $methodNameDeclarations |
226 }; | 226 }; |
227 | 227 |
228 const size_t InspectorBackendDispatcher::commandNamesIndex[] = { | 228 const unsigned short InspectorBackendDispatcher::commandNamesIndex[] = { |
229 $methodNameDeclarationsIndex | 229 $methodNameDeclarationsIndex |
230 }; | 230 }; |
231 | 231 |
232 const char* InspectorBackendDispatcher::commandName(MethodNames index) { | 232 const char* InspectorBackendDispatcher::commandName(MethodNames index) { |
233 static_assert(static_cast<int>(kMethodNamesEnumSize) == WTF_ARRAY_LENGTH(com
mandNamesIndex), "MethodNames enum should have the same number of elements as co
mmandNamesIndex"); | 233 static_assert(static_cast<int>(kMethodNamesEnumSize) == WTF_ARRAY_LENGTH(com
mandNamesIndex), "MethodNames enum should have the same number of elements as co
mmandNamesIndex"); |
234 return commandNames + commandNamesIndex[index]; | 234 return commandNames + commandNamesIndex[index]; |
235 } | 235 } |
236 | 236 |
237 class InspectorBackendDispatcherImpl : public InspectorBackendDispatcher { | 237 class InspectorBackendDispatcherImpl : public InspectorBackendDispatcher { |
238 public: | 238 public: |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 }; | 906 }; |
907 | 907 |
908 """) | 908 """) |
909 | 909 |
910 class_binding_builder_part_4 = ( | 910 class_binding_builder_part_4 = ( |
911 """ static Builder<NoFieldsSet> create() | 911 """ static Builder<NoFieldsSet> create() |
912 { | 912 { |
913 return Builder<NoFieldsSet>(JSONObject::create()); | 913 return Builder<NoFieldsSet>(JSONObject::create()); |
914 } | 914 } |
915 """) | 915 """) |
OLD | NEW |