-
Notifications
You must be signed in to change notification settings - Fork 29.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is instead of generating on each build. When a developer changes the protocol, it will require checking in the generated source.
- Loading branch information
Showing
7 changed files
with
3,059 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"version": { | ||
"major": "1", | ||
"minor": "0" | ||
}, | ||
"domains": [ | ||
{ | ||
"domain": "NodeTracing", | ||
"experimental": true, | ||
"types": [ | ||
{ | ||
"id": "TraceConfig", | ||
"type": "object", | ||
"properties": [ | ||
{ | ||
"name": "recordMode", | ||
"description": "Controls how the trace buffer stores data.", | ||
"optional": true, | ||
"type": "string", | ||
"enum": [ | ||
"recordUntilFull", | ||
"recordContinuously", | ||
"recordAsMuchAsPossible" | ||
] | ||
}, | ||
{ | ||
"name": "includedCategories", | ||
"description": "Included category filters.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"commands": [ | ||
{ | ||
"name": "getCategories", | ||
"description": "Gets supported tracing categories.", | ||
"returns": [ | ||
{ | ||
"name": "categories", | ||
"description": "A list of supported tracing categories.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "start", | ||
"description": "Start trace events collection.", | ||
"parameters": [ | ||
{ | ||
"name": "traceConfig", | ||
"$ref": "TraceConfig" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "stop", | ||
"description": "Stop trace events collection. Remaining collected events will be sent as a sequence of\ndataCollected events followed by tracingComplete event." | ||
} | ||
], | ||
"events": [ | ||
{ | ||
"name": "dataCollected", | ||
"description": "Contains an bucket of collected trace events.", | ||
"parameters": [ | ||
{ | ||
"name": "value", | ||
"type": "array", | ||
"items": { | ||
"type": "object" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "tracingComplete", | ||
"description": "Signals that tracing is stopped and there is no trace buffers pending flush, all data were\ndelivered via dataCollected events." | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
// Copyright 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef node_inspector_protocol_Forward_h | ||
#define node_inspector_protocol_Forward_h | ||
|
||
#include "inspector/node_string.h" | ||
|
||
#include <vector> | ||
|
||
namespace node { | ||
namespace inspector { | ||
namespace protocol { | ||
|
||
template<typename T> class Array; | ||
class DictionaryValue; | ||
class DispatchResponse; | ||
class ErrorSupport; | ||
class FundamentalValue; | ||
class ListValue; | ||
template<typename T> class Maybe; | ||
class Object; | ||
using Response = DispatchResponse; | ||
class SerializedValue; | ||
class StringValue; | ||
class UberDispatcher; | ||
class Value; | ||
|
||
} // namespace node | ||
} // namespace inspector | ||
} // namespace protocol | ||
|
||
#endif // !defined(node_inspector_protocol_Forward_h) | ||
|
||
|
||
// Copyright 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef node_inspector_protocol_Allocator_h | ||
#define node_inspector_protocol_Allocator_h | ||
|
||
namespace node { | ||
namespace inspector { | ||
namespace protocol { | ||
|
||
enum NotNullTagEnum { NotNullLiteral }; | ||
|
||
#define PROTOCOL_DISALLOW_NEW() \ | ||
private: \ | ||
void* operator new(size_t) = delete; \ | ||
void* operator new(size_t, NotNullTagEnum, void*) = delete; \ | ||
void* operator new(size_t, void*) = delete; \ | ||
public: | ||
|
||
#define PROTOCOL_DISALLOW_COPY(ClassName) \ | ||
private: \ | ||
ClassName(const ClassName&) = delete; \ | ||
ClassName& operator=(const ClassName&) = delete | ||
|
||
} // namespace node | ||
} // namespace inspector | ||
} // namespace protocol | ||
|
||
#endif // !defined(node_inspector_protocol_Allocator_h) | ||
|
||
|
||
// Copyright 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef node_inspector_protocol_FrontendChannel_h | ||
#define node_inspector_protocol_FrontendChannel_h | ||
|
||
namespace node { | ||
namespace inspector { | ||
namespace protocol { | ||
|
||
class Serializable { | ||
public: | ||
virtual String serialize() = 0; | ||
virtual ~Serializable() = default; | ||
}; | ||
|
||
class FrontendChannel { | ||
public: | ||
virtual ~FrontendChannel() { } | ||
virtual void sendProtocolResponse(int callId, std::unique_ptr<Serializable> message) = 0; | ||
virtual void sendProtocolNotification(std::unique_ptr<Serializable> message) = 0; | ||
virtual void flushProtocolNotifications() = 0; | ||
}; | ||
|
||
} // namespace node | ||
} // namespace inspector | ||
} // namespace protocol | ||
|
||
#endif // !defined(node_inspector_protocol_FrontendChannel_h) |
Oops, something went wrong.