| OLD | NEW |
| 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/browser_devtools_agent_host.h" | 5 #include "content/browser/devtools/browser_devtools_agent_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/guid.h" | 8 #include "base/guid.h" |
| 9 #include "content/browser/devtools/devtools_protocol_handler.h" | 9 #include "content/browser/devtools/devtools_protocol_handler.h" |
| 10 #include "content/browser/devtools/protocol/io_handler.h" | 10 #include "content/browser/devtools/protocol/io_handler.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 devtools::tracing::TracingHandler::Browser, | 36 devtools::tracing::TracingHandler::Browser, |
| 37 FrameTreeNode::kFrameTreeNodeInvalidId, | 37 FrameTreeNode::kFrameTreeNodeInvalidId, |
| 38 GetIOContext())), | 38 GetIOContext())), |
| 39 protocol_handler_(new DevToolsProtocolHandler(this)) { | 39 protocol_handler_(new DevToolsProtocolHandler(this)) { |
| 40 DevToolsProtocolDispatcher* dispatcher = protocol_handler_->dispatcher(); | 40 DevToolsProtocolDispatcher* dispatcher = protocol_handler_->dispatcher(); |
| 41 dispatcher->SetIOHandler(io_handler_.get()); | 41 dispatcher->SetIOHandler(io_handler_.get()); |
| 42 dispatcher->SetMemoryHandler(memory_handler_.get()); | 42 dispatcher->SetMemoryHandler(memory_handler_.get()); |
| 43 dispatcher->SetSystemInfoHandler(system_info_handler_.get()); | 43 dispatcher->SetSystemInfoHandler(system_info_handler_.get()); |
| 44 dispatcher->SetTetheringHandler(tethering_handler_.get()); | 44 dispatcher->SetTetheringHandler(tethering_handler_.get()); |
| 45 dispatcher->SetTracingHandler(tracing_handler_.get()); | 45 dispatcher->SetTracingHandler(tracing_handler_.get()); |
| 46 NotifyCreated(); |
| 46 } | 47 } |
| 47 | 48 |
| 48 BrowserDevToolsAgentHost::~BrowserDevToolsAgentHost() { | 49 BrowserDevToolsAgentHost::~BrowserDevToolsAgentHost() { |
| 49 } | 50 } |
| 50 | 51 |
| 51 void BrowserDevToolsAgentHost::Attach() { | 52 void BrowserDevToolsAgentHost::Attach() { |
| 52 } | 53 } |
| 53 | 54 |
| 54 void BrowserDevToolsAgentHost::Detach() { | 55 void BrowserDevToolsAgentHost::Detach() { |
| 55 } | 56 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 77 void BrowserDevToolsAgentHost::Reload() { | 78 void BrowserDevToolsAgentHost::Reload() { |
| 78 } | 79 } |
| 79 | 80 |
| 80 bool BrowserDevToolsAgentHost::DispatchProtocolMessage( | 81 bool BrowserDevToolsAgentHost::DispatchProtocolMessage( |
| 81 const std::string& message) { | 82 const std::string& message) { |
| 82 protocol_handler_->HandleMessage(session_id(), message); | 83 protocol_handler_->HandleMessage(session_id(), message); |
| 83 return true; | 84 return true; |
| 84 } | 85 } |
| 85 | 86 |
| 86 } // content | 87 } // content |
| OLD | NEW |