Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Unified Diff: content/browser/devtools/devtools_session.cc

Issue 2864103002: [DevTools] Support multiple DevToolsMessageChunkProcessor instances (Closed)
Patch Set: fix Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/devtools/devtools_session.h ('k') | content/browser/devtools/forwarding_agent_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/devtools_session.cc
diff --git a/content/browser/devtools/devtools_session.cc b/content/browser/devtools/devtools_session.cc
index f9dcb58e6b090f99032a52d319f33350e2c4ff6f..93adadf0674877c173b869a0c992f75ceee7dc0b 100644
--- a/content/browser/devtools/devtools_session.cc
+++ b/content/browser/devtools/devtools_session.cc
@@ -50,7 +50,7 @@ void DevToolsSession::sendResponse(
std::unique_ptr<base::DictionaryValue> response) {
std::string json;
base::JSONWriter::Write(*response.get(), &json);
- agent_host_->SendMessageToClient(session_id_, json);
+ SendMessageToClient(json);
}
protocol::Response::Status DevToolsSession::Dispatch(
@@ -81,15 +81,19 @@ protocol::Response::Status DevToolsSession::Dispatch(
call_id, method);
}
+void DevToolsSession::SendMessageToClient(const std::string& message) {
+ client_->DispatchProtocolMessage(agent_host_, message);
+}
+
void DevToolsSession::sendProtocolResponse(
int call_id,
std::unique_ptr<protocol::Serializable> message) {
- agent_host_->SendMessageToClient(session_id_, message->serialize());
+ SendMessageToClient(message->serialize());
}
void DevToolsSession::sendProtocolNotification(
std::unique_ptr<protocol::Serializable> message) {
- agent_host_->SendMessageToClient(session_id_, message->serialize());
+ SendMessageToClient(message->serialize());
}
void DevToolsSession::flushProtocolNotifications() {
« no previous file with comments | « content/browser/devtools/devtools_session.h ('k') | content/browser/devtools/forwarding_agent_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698