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..0454978b0c8e88116cf89c66c0a4a9be6460f4f5 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 String serialize() = 0; |
+ 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; |
}; |