Add a mechanism for recording an ENVELOPE item.

An ENVELOPE consists of:
* 0xd8 - envelope start byte, a tag with add. info 24
* 0x5a - byte string with 32 bit wide length
* a uint32, encoded in 4 bytes (most significant byte first)
* payload

By default, CBORTokenizer will consider the envelope a single
item, that is, Next() will advance past the entire thing
including the payload. However, EnterEnvelope() lets the client
code look inside and explore.

For now, Both arrays and maps are encoded with an envelope
around them. But we may tweak this later.

Since a message is a map at the top level, that means
it's now wrapped with an envelope, allowing us to extract the
size of the message from the first 6 bytes.
It also gives messages a signature: 0xd8, 0xda.

Change-Id: Ibdfe531c2ea8e3de62ef45da2208a283890208d7
4 files changed
tree: 8a84762df9583e86d778b4e63e76ed1143b92eb6
  1. base/
  2. encoding/
  3. lib/
  4. templates/
  5. testing/
  6. third_party/
  7. .clang-format
  8. .gitignore
  9. .gn
  10. BUILD.gn
  11. BUILDCONFIG.gn
  12. check_protocol_compatibility.py
  13. CheckProtocolCompatibility.py
  14. code_generator.py
  15. codereview.settings
  16. concatenate_protocols.py
  17. convert_protocol_to_json.py
  18. DEPS
  19. inspector_protocol.gni
  20. inspector_protocol.gypi
  21. LICENSE
  22. OWNERS
  23. pdl.py
  24. README.md
  25. sample_config.json
  26. sample_expected_errors.json
  27. WATCHLISTS
README.md

Chromium inspector (devtools) protocol

This package contains code generators and templates for the Chromium inspector protocol.

The canonical location of this package is at https://chromium.googlesource.com/deps/inspector_protocol/

In the Chromium tree, it's rolled into https://cs.chromium.org/chromium/src/third_party/inspector_protocol/

In the V8 tree, it's rolled into https://cs.chromium.org/chromium/src/v8/third_party/inspector_protocol/

See also Contributing to Chrome Devtools Protocol.

We‘re working on enabling standalone builds for parts of this package for testing and development, please feel free to ignore this for now. But, if you’re familiar with Chromium's development process and have the depot_tools installed, you may use these commands to fetch the package (and dependencies) and build and run the tests:

fetch inspector_protocol
cd src
gn gen out/Release
ninja -C out/Release json_parser_test
out/Release/json_parser_test