summaryrefslogtreecommitdiffstats
path: root/android_webview
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-08 10:09:02 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-08 10:09:02 +0000
commitea314c3d9b9b75aadde18f3d5e09c2675c73f92f (patch)
tree0ef6745898865c1e9fe7804681aca4ea3bfa5608 /android_webview
parent9ef96cae05be26fe168f83c8889eaece16ad9c84 (diff)
downloadchromium_src-ea314c3d9b9b75aadde18f3d5e09c2675c73f92f.zip
chromium_src-ea314c3d9b9b75aadde18f3d5e09c2675c73f92f.tar.gz
chromium_src-ea314c3d9b9b75aadde18f3d5e09c2675c73f92f.tar.bz2
DevTools: migrate DevTools APIs to use WebContents instead of RenderViewHost.
R=dgozman@chromium.org, jam@chromium.org TBR=extensions) for simple RVH -> WebContents migration call sites., kalman (apps, mnaganov (android_webview) NOTRY=true Review URL: https://codereview.chromium.org/442303002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288297 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview')
-rw-r--r--android_webview/native/aw_dev_tools_server.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/android_webview/native/aw_dev_tools_server.cc b/android_webview/native/aw_dev_tools_server.cc
index 1aef541..90b72d1 100644
--- a/android_webview/native/aw_dev_tools_server.cc
+++ b/android_webview/native/aw_dev_tools_server.cc
@@ -69,7 +69,7 @@ class Target : public content::DevToolsTarget {
Target::Target(WebContents* web_contents) {
agent_host_ =
- DevToolsAgentHost::GetOrCreateFor(web_contents->GetRenderViewHost());
+ DevToolsAgentHost::GetOrCreateFor(web_contents);
id_ = agent_host_->GetId();
description_ = GetViewDescription(web_contents);
title_ = base::UTF16ToUTF8(web_contents->GetTitle());
@@ -106,13 +106,11 @@ class AwDevToolsServerDelegate : public content::DevToolsHttpHandlerDelegate {
virtual void EnumerateTargets(TargetCallback callback) OVERRIDE {
TargetList targets;
- std::vector<RenderViewHost*> rvh_list =
- DevToolsAgentHost::GetValidRenderViewHosts();
- for (std::vector<RenderViewHost*>::iterator it = rvh_list.begin();
- it != rvh_list.end(); ++it) {
- WebContents* web_contents = WebContents::FromRenderViewHost(*it);
- if (web_contents)
- targets.push_back(new Target(web_contents));
+ std::vector<WebContents*> wc_list =
+ DevToolsAgentHost::GetInspectableWebContents();
+ for (std::vector<WebContents*>::iterator it = wc_list.begin();
+ it != wc_list.end(); ++it) {
+ targets.push_back(new Target(*it));
}
callback.Run(targets);
}