Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Side by Side Diff: content/browser/debugger/render_view_devtools_agent_host.cc

Issue 10065017: TabContents -> WebContentsImpl, part 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/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_impl.h" 9 #include "content/browser/debugger/devtools_manager_impl.h"
10 #include "content/browser/debugger/render_view_devtools_agent_host.h" 10 #include "content/browser/debugger/render_view_devtools_agent_host.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 Instances::iterator it = g_instances.Get().find(rvh); 53 Instances::iterator it = g_instances.Get().find(rvh);
54 return it != g_instances.Get().end(); 54 return it != g_instances.Get().end();
55 } 55 }
56 56
57 bool DevToolsAgentHostRegistry::IsDebuggerAttached(WebContents* web_contents) { 57 bool DevToolsAgentHostRegistry::IsDebuggerAttached(WebContents* web_contents) {
58 if (g_instances == NULL) 58 if (g_instances == NULL)
59 return false; 59 return false;
60 DevToolsManager* devtools_manager = DevToolsManager::GetInstance(); 60 DevToolsManager* devtools_manager = DevToolsManager::GetInstance();
61 if (!devtools_manager) 61 if (!devtools_manager)
62 return false; 62 return false;
63 RenderViewHostDelegate* delegate = static_cast<TabContents*>(web_contents); 63 RenderViewHostDelegate* delegate =
64 static_cast<WebContentsImpl*>(web_contents);
64 for (Instances::iterator it = g_instances.Get().begin(); 65 for (Instances::iterator it = g_instances.Get().begin();
65 it != g_instances.Get().end(); ++it) { 66 it != g_instances.Get().end(); ++it) {
66 if (it->first->GetDelegate() != delegate) 67 if (it->first->GetDelegate() != delegate)
67 continue; 68 continue;
68 if (devtools_manager->GetDevToolsClientHostFor(it->second)) 69 if (devtools_manager->GetDevToolsClientHostFor(it->second))
69 return true; 70 return true;
70 } 71 }
71 return false; 72 return false;
72 } 73 }
73 74
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 145
145 void RenderViewDevToolsAgentHost::OnClearBrowserCache() { 146 void RenderViewDevToolsAgentHost::OnClearBrowserCache() {
146 content::GetContentClient()->browser()->ClearCache(render_view_host_); 147 content::GetContentClient()->browser()->ClearCache(render_view_host_);
147 } 148 }
148 149
149 void RenderViewDevToolsAgentHost::OnClearBrowserCookies() { 150 void RenderViewDevToolsAgentHost::OnClearBrowserCookies() {
150 content::GetContentClient()->browser()->ClearCookies(render_view_host_); 151 content::GetContentClient()->browser()->ClearCookies(render_view_host_);
151 } 152 }
152 153
153 } // namespace content 154 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/debugger/devtools_manager_unittest.cc ('k') | content/public/browser/devtools_client_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698