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_view_devtools_agent_host.h" | 5 #include "content/browser/devtools/render_view_devtools_agent_host.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 g_instances.Get().push_back(this); | 140 g_instances.Get().push_back(this); |
141 RenderViewHostDelegate* delegate = render_view_host_->GetDelegate(); | 141 RenderViewHostDelegate* delegate = render_view_host_->GetDelegate(); |
142 if (delegate && delegate->GetAsWebContents()) | 142 if (delegate && delegate->GetAsWebContents()) |
143 Observe(delegate->GetAsWebContents()); | 143 Observe(delegate->GetAsWebContents()); |
144 } | 144 } |
145 | 145 |
146 RenderViewHost* RenderViewDevToolsAgentHost::GetRenderViewHost() { | 146 RenderViewHost* RenderViewDevToolsAgentHost::GetRenderViewHost() { |
147 return render_view_host_; | 147 return render_view_host_; |
148 } | 148 } |
149 | 149 |
| 150 void RenderViewDevToolsAgentHost::DispatchOnInspectorBackend( |
| 151 const std::string& message) { |
| 152 DevToolsAgentHostImpl::DispatchOnInspectorBackend(message); |
| 153 } |
| 154 |
150 void RenderViewDevToolsAgentHost::SendMessageToAgent(IPC::Message* msg) { | 155 void RenderViewDevToolsAgentHost::SendMessageToAgent(IPC::Message* msg) { |
151 msg->set_routing_id(render_view_host_->GetRoutingID()); | 156 msg->set_routing_id(render_view_host_->GetRoutingID()); |
152 render_view_host_->Send(msg); | 157 render_view_host_->Send(msg); |
153 } | 158 } |
154 | 159 |
155 void RenderViewDevToolsAgentHost::NotifyClientAttaching() { | 160 void RenderViewDevToolsAgentHost::NotifyClientAttaching() { |
156 if (!render_view_host_) | 161 if (!render_view_host_) |
157 return; | 162 return; |
158 | 163 |
159 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadRawCookies( | 164 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadRawCookies( |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 JavaScriptDialogManager* manager = | 352 JavaScriptDialogManager* manager = |
348 web_contents->GetDelegate()->GetJavaScriptDialogManager(); | 353 web_contents->GetDelegate()->GetJavaScriptDialogManager(); |
349 if (!manager) | 354 if (!manager) |
350 return false; | 355 return false; |
351 return manager->HandleJavaScriptDialog(web_contents, accept); | 356 return manager->HandleJavaScriptDialog(web_contents, accept); |
352 } | 357 } |
353 return false; | 358 return false; |
354 } | 359 } |
355 | 360 |
356 } // namespace content | 361 } // namespace content |
OLD | NEW |