| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/render_frame_devtools_agent_host.h" | 5 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 } | 180 } |
| 181 void RenderFrameDevToolsAgentHost::FrameHostHolder::DispatchProtocolMessage( | 181 void RenderFrameDevToolsAgentHost::FrameHostHolder::DispatchProtocolMessage( |
| 182 int call_id, const std::string& message) { | 182 int call_id, const std::string& message) { |
| 183 host_->Send(new DevToolsAgentMsg_DispatchOnInspectorBackend( | 183 host_->Send(new DevToolsAgentMsg_DispatchOnInspectorBackend( |
| 184 host_->GetRoutingID(), message)); | 184 host_->GetRoutingID(), message)); |
| 185 sent_messages_[call_id] = message; | 185 sent_messages_[call_id] = message; |
| 186 } | 186 } |
| 187 | 187 |
| 188 void RenderFrameDevToolsAgentHost::FrameHostHolder::InspectElement( | 188 void RenderFrameDevToolsAgentHost::FrameHostHolder::InspectElement( |
| 189 int x, int y) { | 189 int x, int y) { |
| 190 DCHECK(attached_); |
| 190 host_->Send(new DevToolsAgentMsg_InspectElement( | 191 host_->Send(new DevToolsAgentMsg_InspectElement( |
| 191 host_->GetRoutingID(), agent_->GetId(), x, y)); | 192 host_->GetRoutingID(), x, y)); |
| 192 } | 193 } |
| 193 | 194 |
| 194 void | 195 void |
| 195 RenderFrameDevToolsAgentHost::FrameHostHolder::ProcessChunkedMessageFromAgent( | 196 RenderFrameDevToolsAgentHost::FrameHostHolder::ProcessChunkedMessageFromAgent( |
| 196 const DevToolsMessageChunk& chunk) { | 197 const DevToolsMessageChunk& chunk) { |
| 197 chunk_processor_.ProcessChunkedMessageFromAgent(chunk); | 198 chunk_processor_.ProcessChunkedMessageFromAgent(chunk); |
| 198 } | 199 } |
| 199 | 200 |
| 200 void RenderFrameDevToolsAgentHost::FrameHostHolder::SendMessageToClient( | 201 void RenderFrameDevToolsAgentHost::FrameHostHolder::SendMessageToClient( |
| 201 const std::string& message) { | 202 const std::string& message) { |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 RenderFrameHost* host) { | 741 RenderFrameHost* host) { |
| 741 return (current_ && current_->host() == host) || | 742 return (current_ && current_->host() == host) || |
| 742 (pending_ && pending_->host() == host); | 743 (pending_ && pending_->host() == host); |
| 743 } | 744 } |
| 744 | 745 |
| 745 bool RenderFrameDevToolsAgentHost::IsChildFrame() { | 746 bool RenderFrameDevToolsAgentHost::IsChildFrame() { |
| 746 return current_ && current_->host()->GetParent(); | 747 return current_ && current_->host()->GetParent(); |
| 747 } | 748 } |
| 748 | 749 |
| 749 } // namespace content | 750 } // namespace content |
| OLD | NEW |