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

Side by Side Diff: android_webview/browser/aw_dev_tools_discovery_provider.cc

Issue 2273063002: DevTools: remove DevToolsTargetDescriptor and its implementations, we are now based on devtools age… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "android_webview/browser/aw_dev_tools_discovery_provider.h" 5 #include "android_webview/browser/aw_dev_tools_discovery_provider.h"
6 6
7 #include "android_webview/browser/browser_view_renderer.h" 7 #include "android_webview/browser/browser_view_renderer.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 discovery_manager->AddProvider( 51 discovery_manager->AddProvider(
52 base::WrapUnique(new AwDevToolsDiscoveryProvider())); 52 base::WrapUnique(new AwDevToolsDiscoveryProvider()));
53 } 53 }
54 54
55 AwDevToolsDiscoveryProvider::AwDevToolsDiscoveryProvider() { 55 AwDevToolsDiscoveryProvider::AwDevToolsDiscoveryProvider() {
56 } 56 }
57 57
58 AwDevToolsDiscoveryProvider::~AwDevToolsDiscoveryProvider() { 58 AwDevToolsDiscoveryProvider::~AwDevToolsDiscoveryProvider() {
59 } 59 }
60 60
61 devtools_discovery::DevToolsTargetDescriptor::List 61 content::DevToolsAgentHost::List
62 AwDevToolsDiscoveryProvider::GetDescriptors() { 62 AwDevToolsDiscoveryProvider::GetDescriptors() {
63 DevToolsAgentHost::List agent_hosts = DevToolsAgentHost::GetOrCreateAll(); 63 DevToolsAgentHost::List agent_hosts = DevToolsAgentHost::GetOrCreateAll();
64 devtools_discovery::DevToolsTargetDescriptor::List result;
65 result.reserve(agent_hosts.size());
66 for (auto& agent_host : agent_hosts) { 64 for (auto& agent_host : agent_hosts) {
67 agent_host->SetDescriptionOverride( 65 agent_host->SetDescriptionOverride(
68 GetViewDescription(agent_host->GetWebContents())); 66 GetViewDescription(agent_host->GetWebContents()));
69 result.push_back(new devtools_discovery::BasicTargetDescriptor(agent_host));
70 } 67 }
71 return result; 68 return agent_hosts;
72 } 69 }
73 70
74 } // namespace android_webview 71 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698