Chromium Code Reviews| Index: third_party/inspector_protocol/lib/FrontendChannel_h.template |
| diff --git a/third_party/inspector_protocol/lib/FrontendChannel_h.template b/third_party/inspector_protocol/lib/FrontendChannel_h.template |
| index 8b653b58214b80aaa2f288043aa45866e3346e45..77a40ec910ec9ffc55ecf398822f44af29803359 100644 |
| --- a/third_party/inspector_protocol/lib/FrontendChannel_h.template |
| +++ b/third_party/inspector_protocol/lib/FrontendChannel_h.template |
| @@ -9,11 +9,17 @@ |
| namespace {{namespace}} { |
| {% endfor %} |
| +class {{config.lib.export_macro}} Serializable { |
| +public: |
| + virtual std::unique_ptr<protocol::Value> serializeValue() const = 0; |
|
dgozman
2016/11/21 22:29:16
8 spaces?
dgozman
2016/11/21 22:29:16
Why return value and not json string?
I'd call thi
kozy
2016/11/22 01:25:38
Done.
kozy
2016/11/22 01:25:38
Done.
|
| + virtual ~Serializable() = default; |
| +}; |
| + |
| class {{config.lib.export_macro}} FrontendChannel { |
| public: |
| virtual ~FrontendChannel() { } |
| - virtual void sendProtocolResponse(int callId, const String& message) = 0; |
| - virtual void sendProtocolNotification(const String& message) = 0; |
| + virtual void sendProtocolResponse(int callId, std::unique_ptr<Serializable> message) = 0; |
| + virtual void sendProtocolNotification(std::unique_ptr<Serializable> message) = 0; |
| virtual void flushProtocolNotifications() = 0; |
| }; |