OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/debugger/render_view_devtools_agent_host.h" | 5 #include "content/browser/debugger/render_view_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 "content/browser/debugger/devtools_manager.h" | 9 #include "content/browser/debugger/devtools_manager.h" |
10 #include "content/browser/debugger/render_view_devtools_agent_host.h" | 10 #include "content/browser/debugger/render_view_devtools_agent_host.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 it != g_instances.Get().end(); ++it) { | 43 it != g_instances.Get().end(); ++it) { |
44 if (it->first->delegate() != delegate) | 44 if (it->first->delegate() != delegate) |
45 continue; | 45 continue; |
46 if (devtools_manager->GetDevToolsClientHostFor(it->second)) | 46 if (devtools_manager->GetDevToolsClientHostFor(it->second)) |
47 return true; | 47 return true; |
48 } | 48 } |
49 return false; | 49 return false; |
50 } | 50 } |
51 | 51 |
52 RenderViewDevToolsAgentHost::RenderViewDevToolsAgentHost(RenderViewHost* rvh) | 52 RenderViewDevToolsAgentHost::RenderViewDevToolsAgentHost(RenderViewHost* rvh) |
53 : RenderViewHostObserver(rvh), | 53 : content::RenderViewHostObserver(rvh), |
54 render_view_host_(rvh) { | 54 render_view_host_(rvh) { |
55 g_instances.Get()[rvh] = this; | 55 g_instances.Get()[rvh] = this; |
56 } | 56 } |
57 | 57 |
58 void RenderViewDevToolsAgentHost::SendMessageToAgent(IPC::Message* msg) { | 58 void RenderViewDevToolsAgentHost::SendMessageToAgent(IPC::Message* msg) { |
59 msg->set_routing_id(render_view_host_->routing_id()); | 59 msg->set_routing_id(render_view_host_->routing_id()); |
60 render_view_host_->Send(msg); | 60 render_view_host_->Send(msg); |
61 } | 61 } |
62 | 62 |
63 void RenderViewDevToolsAgentHost::NotifyClientClosing() { | 63 void RenderViewDevToolsAgentHost::NotifyClientClosing() { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 | 110 |
111 void RenderViewDevToolsAgentHost::OnClearBrowserCache() { | 111 void RenderViewDevToolsAgentHost::OnClearBrowserCache() { |
112 content::GetContentClient()->browser()->ClearCache(render_view_host_); | 112 content::GetContentClient()->browser()->ClearCache(render_view_host_); |
113 } | 113 } |
114 | 114 |
115 void RenderViewDevToolsAgentHost::OnClearBrowserCookies() { | 115 void RenderViewDevToolsAgentHost::OnClearBrowserCookies() { |
116 content::GetContentClient()->browser()->ClearCookies(render_view_host_); | 116 content::GetContentClient()->browser()->ClearCookies(render_view_host_); |
117 } | 117 } |
118 | 118 |
OLD | NEW |