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

Side by Side Diff: content/browser/devtools/worker_devtools_agent_host.cc

Issue 2625223002: [DevTools] Dedicated frontend for debugging Node. (Closed)
Patch Set: test fix Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/devtools/worker_devtools_agent_host.h" 5 #include "content/browser/devtools/worker_devtools_agent_host.h"
6 6
7 #include "base/guid.h" 7 #include "base/guid.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "content/browser/devtools/devtools_session.h" 9 #include "content/browser/devtools/devtools_session.h"
10 #include "content/browser/devtools/protocol/inspector_handler.h" 10 #include "content/browser/devtools/protocol/inspector_handler.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 bool WorkerDevToolsAgentHost::DispatchProtocolMessage( 52 bool WorkerDevToolsAgentHost::DispatchProtocolMessage(
53 DevToolsSession* session, 53 DevToolsSession* session,
54 const std::string& message) { 54 const std::string& message) {
55 if (state_ != WORKER_INSPECTED) 55 if (state_ != WORKER_INSPECTED)
56 return true; 56 return true;
57 57
58 int call_id = 0; 58 int call_id = 0;
59 std::string method; 59 std::string method;
60 if (session->Dispatch(message, true, &call_id, &method) != 60 if (session->Dispatch(message, &call_id, &method) !=
61 protocol::Response::kFallThrough) { 61 protocol::Response::kFallThrough) {
62 return true; 62 return true;
63 } 63 }
64 64
65 if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) { 65 if (RenderProcessHost* host = RenderProcessHost::FromID(worker_id_.first)) {
66 host->Send(new DevToolsAgentMsg_DispatchOnInspectorBackend( 66 host->Send(new DevToolsAgentMsg_DispatchOnInspectorBackend(
67 worker_id_.second, session->session_id(), call_id, method, message)); 67 worker_id_.second, session->session_id(), call_id, method, message));
68 } 68 }
69 return true; 69 return true;
70 } 70 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 void WorkerDevToolsAgentHost::OnDispatchOnInspectorFrontend( 159 void WorkerDevToolsAgentHost::OnDispatchOnInspectorFrontend(
160 const DevToolsMessageChunk& message) { 160 const DevToolsMessageChunk& message) {
161 if (!IsAttached()) 161 if (!IsAttached())
162 return; 162 return;
163 163
164 chunk_processor_.ProcessChunkedMessageFromAgent(message); 164 chunk_processor_.ProcessChunkedMessageFromAgent(message);
165 } 165 }
166 166
167 } // namespace content 167 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/devtools/render_frame_devtools_agent_host.cc ('k') | content/public/browser/devtools_agent_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698