Line data Source code
1 : // This file is generated by Forward_h.template.
2 :
3 : // Copyright 2016 The Chromium Authors. All rights reserved.
4 : // Use of this source code is governed by a BSD-style license that can be
5 : // found in the LICENSE file.
6 :
7 : #ifndef v8_inspector_protocol_Forward_h
8 : #define v8_inspector_protocol_Forward_h
9 :
10 : #include "src/inspector/string-util.h"
11 :
12 : #include <cstddef>
13 : #include <memory>
14 : #include <vector>
15 : #include <unordered_map>
16 : #include <unordered_set>
17 :
18 : namespace v8_inspector {
19 : namespace protocol {
20 :
21 : template<typename T> class Array;
22 : class DictionaryValue;
23 : class DispatchResponse;
24 : class ErrorSupport;
25 : class FundamentalValue;
26 : class ListValue;
27 : template<typename T> class Maybe;
28 : class Object;
29 : using Response = DispatchResponse;
30 : class SerializedValue;
31 : class StringValue;
32 : class UberDispatcher;
33 : class Value;
34 :
35 : } // namespace v8_inspector
36 : } // namespace protocol
37 :
38 : #endif // !defined(v8_inspector_protocol_Forward_h)
39 :
40 :
41 : // This file is generated by Allocator_h.template.
42 :
43 : // Copyright 2016 The Chromium Authors. All rights reserved.
44 : // Use of this source code is governed by a BSD-style license that can be
45 : // found in the LICENSE file.
46 :
47 : #ifndef v8_inspector_protocol_Allocator_h
48 : #define v8_inspector_protocol_Allocator_h
49 :
50 : namespace v8_inspector {
51 : namespace protocol {
52 :
53 : enum NotNullTagEnum { NotNullLiteral };
54 :
55 : #define PROTOCOL_DISALLOW_COPY(ClassName) \
56 : private: \
57 : ClassName(const ClassName&) = delete; \
58 : ClassName& operator=(const ClassName&) = delete
59 :
60 : } // namespace v8_inspector
61 : } // namespace protocol
62 :
63 : #endif // !defined(v8_inspector_protocol_Allocator_h)
64 :
65 :
66 : // This file is generated by FrontendChannel_h.template.
67 :
68 : // Copyright 2016 The Chromium Authors. All rights reserved.
69 : // Use of this source code is governed by a BSD-style license that can be
70 : // found in the LICENSE file.
71 :
72 : #ifndef v8_inspector_protocol_FrontendChannel_h
73 : #define v8_inspector_protocol_FrontendChannel_h
74 :
75 : namespace v8_inspector {
76 : namespace protocol {
77 :
78 45941429 : class Serializable {
79 : public:
80 : ProtocolMessage serialize(bool binary) {
81 : if (binary)
82 : return StringUtil::binaryToMessage(serializeToBinary());
83 : else
84 : return StringUtil::jsonToMessage(serializeToJSON());
85 : }
86 : virtual String serializeToJSON() = 0;
87 : virtual std::vector<uint8_t> serializeToBinary() = 0;
88 45941429 : virtual ~Serializable() = default;
89 : };
90 :
91 3832 : class FrontendChannel {
92 : public:
93 3832 : virtual ~FrontendChannel() { }
94 : virtual void sendProtocolResponse(int callId, std::unique_ptr<Serializable> message) = 0;
95 : virtual void sendProtocolNotification(std::unique_ptr<Serializable> message) = 0;
96 : virtual void fallThrough(int callId, const String& method, const ProtocolMessage& message) = 0;
97 : virtual void flushProtocolNotifications() = 0;
98 : };
99 :
100 : } // namespace v8_inspector
101 : } // namespace protocol
102 :
103 : #endif // !defined(v8_inspector_protocol_FrontendChannel_h)
|