Commit d385ed06 authored by kozyatinskiy's avatar kozyatinskiy Committed by Commit bot

[inspector] removed old v8_inspector::Channel API

BUG=chromium:350797
R=dgozman@chromium.org
TBR=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2527473004
Cr-Commit-Position: refs/heads/master@{#41371}
parent f80961a7
......@@ -248,15 +248,9 @@ class V8_EXPORT V8Inspector {
class V8_EXPORT Channel {
public:
virtual ~Channel() {}
virtual void sendProtocolResponse(int callId, const StringView& message) {}
virtual void sendProtocolNotification(const StringView& message) {}
virtual void sendResponse(int callId,
std::unique_ptr<StringBuffer> message) {
sendProtocolResponse(callId, message->string());
}
virtual void sendNotification(std::unique_ptr<StringBuffer> message) {
sendProtocolNotification(message->string());
}
std::unique_ptr<StringBuffer> message) = 0;
virtual void sendNotification(std::unique_ptr<StringBuffer> message) = 0;
virtual void flushProtocolNotifications() = 0;
};
virtual std::unique_ptr<V8InspectorSession> connect(
......
......@@ -1827,13 +1827,14 @@ class InspectorFrontend final : public v8_inspector::V8Inspector::Channel {
virtual ~InspectorFrontend() = default;
private:
void sendProtocolResponse(int callId,
const v8_inspector::StringView& message) override {
Send(message);
}
void sendProtocolNotification(
const v8_inspector::StringView& message) override {
Send(message);
void sendResponse(
int callId,
std::unique_ptr<v8_inspector::StringBuffer> message) override {
Send(message->string());
}
void sendNotification(
std::unique_ptr<v8_inspector::StringBuffer> message) override {
Send(message->string());
}
void flushProtocolNotifications() override {}
......
......@@ -19,13 +19,14 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel {
virtual ~ChannelImpl() = default;
private:
void sendProtocolResponse(int callId,
const v8_inspector::StringView& message) override {
frontend_channel_->SendMessageToFrontend(message);
void sendResponse(
int callId,
std::unique_ptr<v8_inspector::StringBuffer> message) override {
frontend_channel_->SendMessageToFrontend(message->string());
}
void sendProtocolNotification(
const v8_inspector::StringView& message) override {
frontend_channel_->SendMessageToFrontend(message);
void sendNotification(
std::unique_ptr<v8_inspector::StringBuffer> message) override {
frontend_channel_->SendMessageToFrontend(message->string());
}
void flushProtocolNotifications() override {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment