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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 95 |
96 class InspectorFrontendChannel; | 96 class InspectorFrontendChannel; |
97 | 97 |
98 // Both InspectorObject and InspectorArray may or may not be declared at this po
int as defined by ENABLED_INSPECTOR. | 98 // Both InspectorObject and InspectorArray may or may not be declared at this po
int as defined by ENABLED_INSPECTOR. |
99 // Double-check we have them at least as forward declaration. | 99 // Double-check we have them at least as forward declaration. |
100 class InspectorArray; | 100 class InspectorArray; |
101 class InspectorObject; | 101 class InspectorObject; |
102 | 102 |
103 typedef String ErrorString; | 103 typedef String ErrorString; |
104 | 104 |
105 #if ENABLE(INSPECTOR) | |
106 | |
107 class InspectorFrontend { | 105 class InspectorFrontend { |
108 public: | 106 public: |
109 InspectorFrontend(InspectorFrontendChannel*); | 107 InspectorFrontend(InspectorFrontendChannel*); |
110 | 108 |
111 | 109 |
112 $domainClassList | 110 $domainClassList |
113 private: | 111 private: |
114 ${fieldDeclarations}}; | 112 ${fieldDeclarations}}; |
115 | 113 |
116 #endif // ENABLE(INSPECTOR) | |
117 | |
118 } // namespace WebCore | 114 } // namespace WebCore |
119 #endif // !defined(InspectorFrontend_h) | 115 #endif // !defined(InspectorFrontend_h) |
120 """) | 116 """) |
121 | 117 |
122 backend_h = ( | 118 backend_h = ( |
123 """#ifndef InspectorBackendDispatcher_h | 119 """#ifndef InspectorBackendDispatcher_h |
124 #define InspectorBackendDispatcher_h | 120 #define InspectorBackendDispatcher_h |
125 | 121 |
| 122 #include "InspectorTypeBuilder.h" |
| 123 |
126 #include <wtf/PassRefPtr.h> | 124 #include <wtf/PassRefPtr.h> |
127 #include <wtf/RefCounted.h> | 125 #include <wtf/RefCounted.h> |
128 #include <wtf/text/WTFString.h> | 126 #include <wtf/text/WTFString.h> |
129 #include "InspectorTypeBuilder.h" | |
130 | 127 |
131 namespace WebCore { | 128 namespace WebCore { |
132 | 129 |
133 class InspectorAgent; | 130 class InspectorAgent; |
134 class InspectorObject; | 131 class InspectorObject; |
135 class InspectorArray; | 132 class InspectorArray; |
136 class InspectorFrontendChannel; | 133 class InspectorFrontendChannel; |
137 | 134 |
138 typedef String ErrorString; | 135 typedef String ErrorString; |
139 | 136 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 } // namespace WebCore | 193 } // namespace WebCore |
197 #endif // !defined(InspectorBackendDispatcher_h) | 194 #endif // !defined(InspectorBackendDispatcher_h) |
198 | 195 |
199 | 196 |
200 """) | 197 """) |
201 | 198 |
202 backend_cpp = ( | 199 backend_cpp = ( |
203 """ | 200 """ |
204 | 201 |
205 #include "config.h" | 202 #include "config.h" |
| 203 #include "InspectorBackendDispatcher.h" |
206 | 204 |
207 #if ENABLE(INSPECTOR) | |
208 | |
209 #include "InspectorBackendDispatcher.h" | |
210 #include <wtf/text/WTFString.h> | |
211 #include <wtf/text/CString.h> | |
212 | 205 |
213 #include "InspectorAgent.h" | 206 #include "InspectorAgent.h" |
| 207 #include "InspectorFrontendChannel.h" |
214 #include "InspectorValues.h" | 208 #include "InspectorValues.h" |
215 #include "InspectorFrontendChannel.h" | 209 #include <wtf/text/CString.h> |
216 #include <wtf/text/WTFString.h> | 210 #include <wtf/text/WTFString.h> |
217 | 211 |
218 namespace WebCore { | 212 namespace WebCore { |
219 | 213 |
220 const char* InspectorBackendDispatcher::commandNames[] = { | 214 const char* InspectorBackendDispatcher::commandNames[] = { |
221 $methodNameDeclarations | 215 $methodNameDeclarations |
222 }; | 216 }; |
223 | 217 |
224 | 218 |
225 class InspectorBackendDispatcherImpl : public InspectorBackendDispatcher { | 219 class InspectorBackendDispatcherImpl : public InspectorBackendDispatcher { |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 if (m_alreadySent) | 491 if (m_alreadySent) |
498 return; | 492 return; |
499 m_backendImpl->sendResponse(m_id, partialMessage, invocationError); | 493 m_backendImpl->sendResponse(m_id, partialMessage, invocationError); |
500 m_alreadySent = true; | 494 m_alreadySent = true; |
501 } | 495 } |
502 | 496 |
503 COMPILE_ASSERT(static_cast<int>(InspectorBackendDispatcher::kMethodNamesEnumSize
) == WTF_ARRAY_LENGTH(InspectorBackendDispatcher::commandNames), command_name_ar
ray_problem); | 497 COMPILE_ASSERT(static_cast<int>(InspectorBackendDispatcher::kMethodNamesEnumSize
) == WTF_ARRAY_LENGTH(InspectorBackendDispatcher::commandNames), command_name_ar
ray_problem); |
504 | 498 |
505 } // namespace WebCore | 499 } // namespace WebCore |
506 | 500 |
507 #endif // ENABLE(INSPECTOR) | |
508 """) | 501 """) |
509 | 502 |
510 frontend_cpp = ( | 503 frontend_cpp = ( |
511 """ | 504 """ |
512 | 505 |
513 #include "config.h" | 506 #include "config.h" |
514 #if ENABLE(INSPECTOR) | |
515 | 507 |
516 #include "InspectorFrontend.h" | 508 #include "InspectorFrontend.h" |
517 #include <wtf/text/WTFString.h> | |
518 #include <wtf/text/CString.h> | |
519 | |
520 #include "InspectorFrontendChannel.h" | 509 #include "InspectorFrontendChannel.h" |
521 #include "InspectorValues.h" | 510 #include "InspectorValues.h" |
| 511 |
| 512 #include <wtf/text/CString.h> |
522 #include <wtf/text/WTFString.h> | 513 #include <wtf/text/WTFString.h> |
523 | 514 |
524 namespace WebCore { | 515 namespace WebCore { |
525 | 516 |
526 InspectorFrontend::InspectorFrontend(InspectorFrontendChannel* inspectorFrontend
Channel) | 517 InspectorFrontend::InspectorFrontend(InspectorFrontendChannel* inspectorFrontend
Channel) |
527 : $constructorInit{ | 518 : $constructorInit{ |
528 } | 519 } |
529 | 520 |
530 $methods | 521 $methods |
531 | 522 |
532 } // namespace WebCore | 523 } // namespace WebCore |
533 | 524 |
534 #endif // ENABLE(INSPECTOR) | |
535 """) | 525 """) |
536 | 526 |
537 typebuilder_h = ( | 527 typebuilder_h = ( |
538 """ | 528 """ |
539 #ifndef InspectorTypeBuilder_h | 529 #ifndef InspectorTypeBuilder_h |
540 #define InspectorTypeBuilder_h | 530 #define InspectorTypeBuilder_h |
541 | 531 |
542 #if ENABLE(INSPECTOR) | 532 #include "InspectorValues.h" |
543 | 533 |
544 #include "InspectorValues.h" | |
545 #include <wtf/Assertions.h> | 534 #include <wtf/Assertions.h> |
546 #include <wtf/PassRefPtr.h> | 535 #include <wtf/PassRefPtr.h> |
547 | 536 |
548 namespace WebCore { | 537 namespace WebCore { |
549 | 538 |
550 namespace TypeBuilder { | 539 namespace TypeBuilder { |
551 | 540 |
552 template<typename T> | 541 template<typename T> |
553 class OptOutput { | 542 class OptOutput { |
554 public: | 543 public: |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 ${forwards} | 813 ${forwards} |
825 | 814 |
826 String getEnumConstantValue(int code); | 815 String getEnumConstantValue(int code); |
827 | 816 |
828 ${typeBuilders} | 817 ${typeBuilders} |
829 } // namespace TypeBuilder | 818 } // namespace TypeBuilder |
830 | 819 |
831 | 820 |
832 } // namespace WebCore | 821 } // namespace WebCore |
833 | 822 |
834 #endif // ENABLE(INSPECTOR) | |
835 | |
836 #endif // !defined(InspectorTypeBuilder_h) | 823 #endif // !defined(InspectorTypeBuilder_h) |
837 | 824 |
838 """) | 825 """) |
839 | 826 |
840 typebuilder_cpp = ( | 827 typebuilder_cpp = ( |
841 """ | 828 """ |
842 | 829 |
843 #include "config.h" | 830 #include "config.h" |
844 #if ENABLE(INSPECTOR) | |
845 | 831 |
846 #include "InspectorTypeBuilder.h" | 832 #include "InspectorTypeBuilder.h" |
| 833 |
847 #include <wtf/text/CString.h> | 834 #include <wtf/text/CString.h> |
848 | 835 |
849 namespace WebCore { | 836 namespace WebCore { |
850 | 837 |
851 namespace TypeBuilder { | 838 namespace TypeBuilder { |
852 | 839 |
853 const char* const enum_constant_values[] = { | 840 const char* const enum_constant_values[] = { |
854 $enumConstantValues}; | 841 $enumConstantValues}; |
855 | 842 |
856 String getEnumConstantValue(int code) { | 843 String getEnumConstantValue(int code) { |
(...skipping 19 matching lines...) Expand all Loading... |
876 ASSERT_UNUSED(castRes, castRes); | 863 ASSERT_UNUSED(castRes, castRes); |
877 ASSERT(static_cast<double>(static_cast<int>(v)) == v); | 864 ASSERT(static_cast<double>(static_cast<int>(v)) == v); |
878 } | 865 } |
879 | 866 |
880 $validatorCode | 867 $validatorCode |
881 | 868 |
882 #endif // $validatorIfdefName | 869 #endif // $validatorIfdefName |
883 | 870 |
884 } // namespace WebCore | 871 } // namespace WebCore |
885 | 872 |
886 #endif // ENABLE(INSPECTOR) | |
887 """) | 873 """) |
888 | 874 |
889 backend_js = ( | 875 backend_js = ( |
890 """ | 876 """ |
891 | 877 |
892 $domainInitializers | 878 $domainInitializers |
893 """) | 879 """) |
894 | 880 |
895 param_container_access_code = """ | 881 param_container_access_code = """ |
896 RefPtr<InspectorObject> paramsContainer = requestMessageObject->getObject("p
arams"); | 882 RefPtr<InspectorObject> paramsContainer = requestMessageObject->getObject("p
arams"); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 }; | 931 }; |
946 | 932 |
947 """) | 933 """) |
948 | 934 |
949 class_binding_builder_part_4 = ( | 935 class_binding_builder_part_4 = ( |
950 """ static Builder<NoFieldsSet> create() | 936 """ static Builder<NoFieldsSet> create() |
951 { | 937 { |
952 return Builder<NoFieldsSet>(InspectorObject::create()); | 938 return Builder<NoFieldsSet>(InspectorObject::create()); |
953 } | 939 } |
954 """) | 940 """) |
OLD | NEW |