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 { ...@@ -248,15 +248,9 @@ class V8_EXPORT V8Inspector {
class V8_EXPORT Channel { class V8_EXPORT Channel {
public: public:
virtual ~Channel() {} virtual ~Channel() {}
virtual void sendProtocolResponse(int callId, const StringView& message) {}
virtual void sendProtocolNotification(const StringView& message) {}
virtual void sendResponse(int callId, virtual void sendResponse(int callId,
std::unique_ptr<StringBuffer> message) { std::unique_ptr<StringBuffer> message) = 0;
sendProtocolResponse(callId, message->string()); virtual void sendNotification(std::unique_ptr<StringBuffer> message) = 0;
}
virtual void sendNotification(std::unique_ptr<StringBuffer> message) {
sendProtocolNotification(message->string());
}
virtual void flushProtocolNotifications() = 0; virtual void flushProtocolNotifications() = 0;
}; };
virtual std::unique_ptr<V8InspectorSession> connect( virtual std::unique_ptr<V8InspectorSession> connect(
......
...@@ -1827,13 +1827,14 @@ class InspectorFrontend final : public v8_inspector::V8Inspector::Channel { ...@@ -1827,13 +1827,14 @@ class InspectorFrontend final : public v8_inspector::V8Inspector::Channel {
virtual ~InspectorFrontend() = default; virtual ~InspectorFrontend() = default;
private: private:
void sendProtocolResponse(int callId, void sendResponse(
const v8_inspector::StringView& message) override { int callId,
Send(message); std::unique_ptr<v8_inspector::StringBuffer> message) override {
} Send(message->string());
void sendProtocolNotification( }
const v8_inspector::StringView& message) override { void sendNotification(
Send(message); std::unique_ptr<v8_inspector::StringBuffer> message) override {
Send(message->string());
} }
void flushProtocolNotifications() override {} void flushProtocolNotifications() override {}
......
...@@ -19,13 +19,14 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel { ...@@ -19,13 +19,14 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel {
virtual ~ChannelImpl() = default; virtual ~ChannelImpl() = default;
private: private:
void sendProtocolResponse(int callId, void sendResponse(
const v8_inspector::StringView& message) override { int callId,
frontend_channel_->SendMessageToFrontend(message); std::unique_ptr<v8_inspector::StringBuffer> message) override {
frontend_channel_->SendMessageToFrontend(message->string());
} }
void sendProtocolNotification( void sendNotification(
const v8_inspector::StringView& message) override { std::unique_ptr<v8_inspector::StringBuffer> message) override {
frontend_channel_->SendMessageToFrontend(message); frontend_channel_->SendMessageToFrontend(message->string());
} }
void flushProtocolNotifications() override {} 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