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

Side by Side Diff: chrome/browser/devtools/chrome_devtools_manager_delegate.cc

Issue 2344753002: DevTools: return discovered targets asynchronously. (Closed)
Patch Set: for bots Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/devtools/chrome_devtools_manager_delegate.h" 5 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/devtools/devtools_network_protocol_handler.h" 9 #include "chrome/browser/devtools/devtools_network_protocol_handler.h"
10 #include "chrome/browser/devtools/devtools_window.h" 10 #include "chrome/browser/devtools/devtools_window.h"
(...skipping 12 matching lines...) Expand all
23 #include "extensions/browser/extension_registry.h" 23 #include "extensions/browser/extension_registry.h"
24 #include "extensions/browser/process_manager.h" 24 #include "extensions/browser/process_manager.h"
25 #include "ui/base/resource/resource_bundle.h" 25 #include "ui/base/resource/resource_bundle.h"
26 26
27 char ChromeDevToolsManagerDelegate::kTypeApp[] = "app"; 27 char ChromeDevToolsManagerDelegate::kTypeApp[] = "app";
28 char ChromeDevToolsManagerDelegate::kTypeBackgroundPage[] = "background_page"; 28 char ChromeDevToolsManagerDelegate::kTypeBackgroundPage[] = "background_page";
29 char ChromeDevToolsManagerDelegate::kTypeWebView[] = "webview"; 29 char ChromeDevToolsManagerDelegate::kTypeWebView[] = "webview";
30 30
31 ChromeDevToolsManagerDelegate::ChromeDevToolsManagerDelegate() 31 ChromeDevToolsManagerDelegate::ChromeDevToolsManagerDelegate()
32 : network_protocol_handler_(new DevToolsNetworkProtocolHandler()) { 32 : network_protocol_handler_(new DevToolsNetworkProtocolHandler()) {
33 content::DevToolsAgentHost::AddDiscoveryProvider(
34 base::Bind(&content::DevToolsAgentHost::GetOrCreateAll));
35 } 33 }
36 34
37 ChromeDevToolsManagerDelegate::~ChromeDevToolsManagerDelegate() { 35 ChromeDevToolsManagerDelegate::~ChromeDevToolsManagerDelegate() {
38 } 36 }
39 37
40 void ChromeDevToolsManagerDelegate::Inspect( 38 void ChromeDevToolsManagerDelegate::Inspect(
41 content::DevToolsAgentHost* agent_host) { 39 content::DevToolsAgentHost* agent_host) {
42 Profile* profile = 40 Profile* profile =
43 Profile::FromBrowserContext(agent_host->GetBrowserContext()); 41 Profile::FromBrowserContext(agent_host->GetBrowserContext());
44 if (!profile) 42 if (!profile)
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 std::string ChromeDevToolsManagerDelegate::GetFrontendResource( 144 std::string ChromeDevToolsManagerDelegate::GetFrontendResource(
147 const std::string& path) { 145 const std::string& path) {
148 return content::DevToolsFrontendHost::GetFrontendResource(path).as_string(); 146 return content::DevToolsFrontendHost::GetFrontendResource(path).as_string();
149 } 147 }
150 148
151 void ChromeDevToolsManagerDelegate::DevToolsAgentStateChanged( 149 void ChromeDevToolsManagerDelegate::DevToolsAgentStateChanged(
152 content::DevToolsAgentHost* agent_host, 150 content::DevToolsAgentHost* agent_host,
153 bool attached) { 151 bool attached) {
154 network_protocol_handler_->DevToolsAgentStateChanged(agent_host, attached); 152 network_protocol_handler_->DevToolsAgentStateChanged(agent_host, attached);
155 } 153 }
OLDNEW
« no previous file with comments | « chrome/browser/android/devtools_manager_delegate_android.cc ('k') | content/browser/devtools/devtools_agent_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698