Commit 2236ce0a authored by pfeldman's avatar pfeldman Committed by Commit bot

DevTools: prefer tab-based ids when reporting disovered targets on android.

BUG=641390
TBR= follow-up to change in the API.

Review-Url: https://codereview.chromium.org/2356883002
Cr-Commit-Position: refs/heads/master@{#419902}
parent eaf8defb
......@@ -54,6 +54,8 @@ class TabProxyDelegate : public content::DevToolsExternalAgentProxyDelegate,
void Attach(content::DevToolsExternalAgentProxy* proxy) override {
proxy_ = proxy;
MaterializeAgentHost();
if (agent_host_)
agent_host_->AttachClient(this);
}
void Detach() override {
......@@ -170,10 +172,14 @@ DevToolsAgentHost::List GetDescriptors() {
if (!tab)
continue;
if (tab->web_contents())
tab_web_contents.insert(tab->web_contents());
scoped_refptr<DevToolsAgentHost> host =
DevToolsAgentHost::Forward(
base::IntToString(tab->GetAndroidId()),
base::WrapUnique(new TabProxyDelegate(tab)));
result.push_back(host);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment