[DevTools] Support UTF16 strings with binary protocol (ip).

base_string_adapter_{cc,h}.template:
- StringUTF8Adapter is no longer needed.
- StringUtil::fromUTF16 creates protocol::String from a given
  UTF16 payload. For the browser / embedder, they'll need
  to convert to UTF8 for std::string.
- JSONReader::Read is now a deprecated method.

Values_cpp.template:
- CBORTokenTag::STRING16 is now supported, by calling

  StringUtil::fromUTF16.
- A StringEncoder abstraction dispatches between the different
  strings, selecting the most appropriate CBOR encoding.

Chromium PR:
https://chromium-review.googlesource.com/c/chromium/src/+/1493152

V8 PR:
https://chromium-review.googlesource.com/c/v8/v8/+/1493291

Change-Id: Idb7b09363d09911ad139bc561f9ac1cae29e7423
3 files changed
tree: c7a3ea0d5d75ed68a0ec2dc38654a54ed716f73d
  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. code_generator.py
  14. codereview.settings
  15. concatenate_protocols.py
  16. convert_protocol_to_json.py
  17. DEPS
  18. gen_cbor_templates.py
  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

You'll probably also need to install g++, since Clang uses this to find the standard C++ headers. E.g.,

sudo apt-get install g++-8