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

Unified Diff: components/devtools_http_handler/devtools_http_handler.h

Issue 1114503002: [DevTools] Cleanup DevToolsTarget and DevToolsManagerDelegate after moving to devtools_discovery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@devtools-discovery-chrome
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/devtools_http_handler/DEPS ('k') | components/devtools_http_handler/devtools_http_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/devtools_http_handler/devtools_http_handler.h
diff --git a/components/devtools_http_handler/devtools_http_handler.h b/components/devtools_http_handler/devtools_http_handler.h
index 23a6773d9f5bdfd262c25cfe3636f7700fe1f3e8..5635b2dba33d8e282ecb1648157c02595dabacbd 100644
--- a/components/devtools_http_handler/devtools_http_handler.h
+++ b/components/devtools_http_handler/devtools_http_handler.h
@@ -11,7 +11,7 @@
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "content/public/browser/devtools_manager_delegate.h"
+#include "components/devtools_discovery/devtools_target_descriptor.h"
#include "net/http/http_status_code.h"
class GURL;
@@ -64,13 +64,10 @@ class DevToolsHttpHandler {
// socket_factory was initialized with an ephemeral port (0). The
// port selected by the OS will be written to a well-known file in
// the output directory.
- // TODO(dgozman): remove |manager_delegate| by moving targets to another
- // component (http://crbug.com/476496).
DevToolsHttpHandler(
scoped_ptr<ServerSocketFactory> server_socket_factory,
const std::string& frontend_url,
DevToolsHttpHandlerDelegate* delegate,
- content::DevToolsManagerDelegate* manager_delegate,
const base::FilePath& active_port_output_directory,
const base::FilePath& debug_frontend_dir,
const std::string& product_name,
@@ -104,17 +101,8 @@ class DevToolsHttpHandler {
ServerSocketFactory* socket_factory,
scoped_ptr<net::IPEndPoint> ip_address);
- static void OnTargetListReceivedWeak(
- base::WeakPtr<DevToolsHttpHandler> handler,
- int connection_id,
- const std::string& host,
- const content::DevToolsManagerDelegate::TargetList& targets);
- void OnTargetListReceived(
- int connection_id,
- const std::string& host,
- const content::DevToolsManagerDelegate::TargetList& targets);
-
- content::DevToolsTarget* GetTarget(const std::string& id);
+ devtools_discovery::DevToolsTargetDescriptor* GetDescriptor(
+ const std::string& target_id);
void SendJson(int connection_id,
net::HttpStatusCode status_code,
@@ -133,8 +121,9 @@ class DevToolsHttpHandler {
std::string GetFrontendURLInternal(const std::string target_id,
const std::string& host);
- base::DictionaryValue* SerializeTarget(const content::DevToolsTarget& target,
- const std::string& host);
+ base::DictionaryValue* SerializeDescriptor(
+ const devtools_discovery::DevToolsTargetDescriptor& descriptor,
+ const std::string& host);
// The thread used by the devtools handler to run server socket.
base::Thread* thread_;
@@ -146,10 +135,10 @@ class DevToolsHttpHandler {
typedef std::map<int, DevToolsAgentHostClientImpl*> ConnectionToClientMap;
ConnectionToClientMap connection_to_client_;
const scoped_ptr<DevToolsHttpHandlerDelegate> delegate_;
- content::DevToolsManagerDelegate* manager_delegate_;
ServerSocketFactory* socket_factory_;
- typedef std::map<std::string, content::DevToolsTarget*> TargetMap;
- TargetMap target_map_;
+ using DescriptorMap =
+ std::map<std::string, devtools_discovery::DevToolsTargetDescriptor*>;
+ DescriptorMap descriptor_map_;
base::WeakPtrFactory<DevToolsHttpHandler> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandler);
« no previous file with comments | « components/devtools_http_handler/DEPS ('k') | components/devtools_http_handler/devtools_http_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698