| 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 "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "content/browser/devtools/devtools_agent_host_impl.h" | |
| 10 #include "content/browser/devtools/devtools_manager.h" | 9 #include "content/browser/devtools/devtools_manager.h" |
| 11 #include "content/browser/devtools/protocol/protocol.h" | 10 #include "content/browser/devtools/protocol/protocol.h" |
| 12 #include "content/public/browser/devtools_manager_delegate.h" | 11 #include "content/public/browser/devtools_manager_delegate.h" |
| 13 | 12 |
| 14 namespace content { | 13 namespace content { |
| 15 | 14 |
| 16 DevToolsSession::DevToolsSession(DevToolsAgentHostImpl* agent_host, | 15 DevToolsSession::DevToolsSession(DevToolsAgentHostImpl* agent_host, |
| 17 DevToolsAgentHostClient* client, | 16 DevToolsAgentHostClient* client, |
| 18 int session_id) | 17 int session_id) |
| 19 : agent_host_(agent_host), | 18 : agent_host_(agent_host), |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 88 } |
| 90 | 89 |
| 91 void DevToolsSession::sendProtocolNotification( | 90 void DevToolsSession::sendProtocolNotification( |
| 92 std::unique_ptr<protocol::Serializable> message) { | 91 std::unique_ptr<protocol::Serializable> message) { |
| 93 agent_host_->SendMessageToClient(session_id_, message->serialize()); | 92 agent_host_->SendMessageToClient(session_id_, message->serialize()); |
| 94 } | 93 } |
| 95 | 94 |
| 96 void DevToolsSession::flushProtocolNotifications() { | 95 void DevToolsSession::flushProtocolNotifications() { |
| 97 } | 96 } |
| 98 | 97 |
| 99 protocol::DevToolsDomainHandler* DevToolsSession::GetHandlerByName( | |
| 100 const std::string& name) { | |
| 101 auto it = handlers_.find(name); | |
| 102 if (it == handlers_.end()) | |
| 103 return nullptr; | |
| 104 return it->second.get(); | |
| 105 } | |
| 106 | |
| 107 } // namespace content | 98 } // namespace content |
| OLD | NEW |