OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/devtools_session.h" | 5 #include "content/browser/devtools/devtools_session.h" |
6 | 6 |
7 #include "content/browser/devtools/devtools_agent_host_impl.h" | 7 #include "content/browser/devtools/devtools_agent_host_impl.h" |
8 #include "content/browser/devtools/protocol/protocol.h" | 8 #include "content/browser/devtools/protocol/protocol.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
11 | 11 |
12 DevToolsSession::DevToolsSession( | 12 DevToolsSession::DevToolsSession( |
13 DevToolsAgentHostImpl* agent_host, | 13 DevToolsAgentHostImpl* agent_host, |
14 int session_id) | 14 int session_id) |
15 : agent_host_(agent_host), | 15 : agent_host_(agent_host), |
16 session_id_(session_id), | 16 session_id_(session_id), |
17 dispatcher_(new protocol::UberDispatcher(this)) { | 17 dispatcher_(new protocol::UberDispatcher(this)) { |
18 } | 18 } |
19 | 19 |
20 DevToolsSession::~DevToolsSession() {} | 20 DevToolsSession::~DevToolsSession() {} |
21 | 21 |
| 22 void DevToolsSession::ResetDispatcher() { |
| 23 dispatcher_.reset(); |
| 24 } |
| 25 |
22 void DevToolsSession::sendProtocolResponse( | 26 void DevToolsSession::sendProtocolResponse( |
23 int call_id, | 27 int call_id, |
24 const std::string& message) { | 28 const std::string& message) { |
25 agent_host_->SendMessageToClient(session_id_, message); | 29 agent_host_->SendMessageToClient(session_id_, message); |
26 } | 30 } |
27 | 31 |
28 void DevToolsSession::sendProtocolNotification(const std::string& message) { | 32 void DevToolsSession::sendProtocolNotification(const std::string& message) { |
29 agent_host_->SendMessageToClient(session_id_, message); | 33 agent_host_->SendMessageToClient(session_id_, message); |
30 } | 34 } |
31 | 35 |
32 void DevToolsSession::flushProtocolNotifications() { | 36 void DevToolsSession::flushProtocolNotifications() { |
33 } | 37 } |
34 | 38 |
35 } // namespace content | 39 } // namespace content |
OLD | NEW |