| 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 "content/browser/content_browser_client.h" | |
| 9 #include "content/browser/debugger/devtools_manager.h" | 8 #include "content/browser/debugger/devtools_manager.h" |
| 10 #include "content/browser/debugger/render_view_devtools_agent_host.h" | 9 #include "content/browser/debugger/render_view_devtools_agent_host.h" |
| 11 #include "content/browser/renderer_host/render_process_host.h" | 10 #include "content/browser/renderer_host/render_process_host.h" |
| 12 #include "content/browser/renderer_host/render_view_host.h" | 11 #include "content/browser/renderer_host/render_view_host.h" |
| 13 #include "content/browser/site_instance.h" | 12 #include "content/browser/site_instance.h" |
| 14 #include "content/browser/tab_contents/tab_contents.h" | 13 #include "content/browser/tab_contents/tab_contents.h" |
| 15 #include "content/common/devtools_messages.h" | 14 #include "content/common/devtools_messages.h" |
| 16 #include "content/common/notification_service.h" | 15 #include "content/common/notification_service.h" |
| 16 #include "content/public/browser/content_browser_client.h" |
| 17 #include "content/public/browser/notification_types.h" | 17 #include "content/public/browser/notification_types.h" |
| 18 | 18 |
| 19 RenderViewDevToolsAgentHost::Instances RenderViewDevToolsAgentHost::instances_; | 19 RenderViewDevToolsAgentHost::Instances RenderViewDevToolsAgentHost::instances_; |
| 20 | 20 |
| 21 DevToolsAgentHost* RenderViewDevToolsAgentHost::FindFor( | 21 DevToolsAgentHost* RenderViewDevToolsAgentHost::FindFor( |
| 22 RenderViewHost* rvh) { | 22 RenderViewHost* rvh) { |
| 23 Instances::iterator it = instances_.find(rvh); | 23 Instances::iterator it = instances_.find(rvh); |
| 24 if (it != instances_.end()) | 24 if (it != instances_.end()) |
| 25 return it->second; | 25 return it->second; |
| 26 return new RenderViewDevToolsAgentHost(rvh); | 26 return new RenderViewDevToolsAgentHost(rvh); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 } | 101 } |
| 102 | 102 |
| 103 void RenderViewDevToolsAgentHost::OnClearBrowserCache() { | 103 void RenderViewDevToolsAgentHost::OnClearBrowserCache() { |
| 104 content::GetContentClient()->browser()->ClearCache(render_view_host_); | 104 content::GetContentClient()->browser()->ClearCache(render_view_host_); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void RenderViewDevToolsAgentHost::OnClearBrowserCookies() { | 107 void RenderViewDevToolsAgentHost::OnClearBrowserCookies() { |
| 108 content::GetContentClient()->browser()->ClearCookies(render_view_host_); | 108 content::GetContentClient()->browser()->ClearCookies(render_view_host_); |
| 109 } | 109 } |
| 110 | 110 |
| OLD | NEW |