[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}
This commit is contained in:
kozyatinskiy 2016-11-29 11:31:05 -08:00 committed by Commit bot
parent f80961a782
commit d385ed069b
3 changed files with 16 additions and 20 deletions

View File

@ -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(

View File

@ -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 sendResponse(
int callId,
std::unique_ptr<v8_inspector::StringBuffer> message) override {
Send(message->string());
}
void sendProtocolNotification(
const v8_inspector::StringView& message) override {
Send(message);
void sendNotification(
std::unique_ptr<v8_inspector::StringBuffer> message) override {
Send(message->string());
}
void flushProtocolNotifications() override {}

View File

@ -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 {}