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

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

Issue 2573423002: [DevTools] Remove old generator in content. (Closed)
Patch Set: fixed review comment Created 4 years 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/render_frame_devtools_agent_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/render_frame_devtools_agent_host.cc
diff --git a/content/browser/devtools/render_frame_devtools_agent_host.cc b/content/browser/devtools/render_frame_devtools_agent_host.cc
index 7d3b568e334e4be2496ff606237033aa53b45dc3..c01b1a8501319b5e351e9dbdccf54b14a5bd5053 100644
--- a/content/browser/devtools/render_frame_devtools_agent_host.cc
+++ b/content/browser/devtools/render_frame_devtools_agent_host.cc
@@ -16,7 +16,6 @@
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/devtools/devtools_frame_trace_recorder.h"
#include "content/browser/devtools/devtools_manager.h"
-#include "content/browser/devtools/devtools_protocol_handler.h"
#include "content/browser/devtools/devtools_session.h"
#include "content/browser/devtools/page_navigation_throttle.h"
#include "content/browser/devtools/protocol/dom_handler.h"
@@ -404,7 +403,6 @@ RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost(
RenderFrameHostImpl* host)
: DevToolsAgentHostImpl(base::GenerateGUID()),
frame_trace_recorder_(nullptr),
- protocol_handler_(new DevToolsProtocolHandler(this)),
handlers_frame_host_(nullptr),
current_frame_crashed_(false),
pending_handle_(nullptr),
@@ -581,18 +579,10 @@ void RenderFrameDevToolsAgentHost::Detach() {
bool RenderFrameDevToolsAgentHost::DispatchProtocolMessage(
const std::string& message) {
- std::unique_ptr<base::Value> value = base::JSONReader::Read(message);
- std::unique_ptr<protocol::Value> protocolValue =
- protocol::toProtocolValue(value.get(), 1000);
- if (session()->dispatcher()->dispatch(std::move(protocolValue)) !=
- protocol::Response::kFallThrough) {
- return true;
- }
-
int call_id = 0;
std::string method;
- if (protocol_handler_->HandleOptionalMessage(
- session()->session_id(), std::move(value), &call_id, &method)) {
+ if (session()->Dispatch(message, &call_id, &method) !=
+ protocol::Response::kFallThrough) {
return true;
}
« no previous file with comments | « content/browser/devtools/render_frame_devtools_agent_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698