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

Side by Side Diff: content/browser/debugger/devtools_http_handler_impl.h

Issue 10169043: Allow customization of remote debugger URL targets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_
6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_ 6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/public/browser/devtools_http_handler.h" 17 #include "content/public/browser/devtools_http_handler.h"
18 #include "content/public/browser/devtools_http_handler_delegate.h"
18 #include "net/server/http_server.h" 19 #include "net/server/http_server.h"
19 #include "net/url_request/url_request.h" 20 #include "net/url_request/url_request.h"
20 21
21 namespace net { 22 namespace net {
22 class URLRequestContextGetter; 23 class URLRequestContextGetter;
23 } 24 }
24 25
25 namespace content { 26 namespace content {
26 27
27 class DevToolsClientHost; 28 class DevToolsClientHost;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void RequestCompleted(net::URLRequest* request); 83 void RequestCompleted(net::URLRequest* request);
83 84
84 void Send200(int connection_id, 85 void Send200(int connection_id,
85 const std::string& data, 86 const std::string& data,
86 const std::string& mime_type = "text/html"); 87 const std::string& mime_type = "text/html");
87 void Send404(int connection_id); 88 void Send404(int connection_id);
88 void Send500(int connection_id, 89 void Send500(int connection_id,
89 const std::string& message); 90 const std::string& message);
90 void AcceptWebSocket(int connection_id, 91 void AcceptWebSocket(int connection_id,
91 const net::HttpServerRequestInfo& request); 92 const net::HttpServerRequestInfo& request);
92 size_t BindRenderViewHost(RenderViewHost* rvh);
93 RenderViewHost* GetBoundRenderViewHost(size_t id);
94 void ResetRenderViewHostBinding();
95 93
96 std::string ip_; 94 std::string ip_;
97 int port_; 95 int port_;
98 std::string overridden_frontend_url_; 96 std::string overridden_frontend_url_;
99 scoped_refptr<net::HttpServer> server_; 97 scoped_refptr<net::HttpServer> server_;
100 typedef std::map<net::URLRequest*, int> 98 typedef std::map<net::URLRequest*, int>
101 RequestToSocketMap; 99 RequestToSocketMap;
102 RequestToSocketMap request_to_connection_io_; 100 RequestToSocketMap request_to_connection_io_;
103 typedef std::map<int, std::set<net::URLRequest*> > 101 typedef std::map<int, std::set<net::URLRequest*> >
104 ConnectionToRequestsMap; 102 ConnectionToRequestsMap;
105 ConnectionToRequestsMap connection_to_requests_io_; 103 ConnectionToRequestsMap connection_to_requests_io_;
106 typedef std::map<net::URLRequest*, scoped_refptr<net::IOBuffer> > 104 typedef std::map<net::URLRequest*, scoped_refptr<net::IOBuffer> >
107 BuffersMap; 105 BuffersMap;
108 BuffersMap request_to_buffer_io_; 106 BuffersMap request_to_buffer_io_;
109 typedef std::map<int, content::DevToolsClientHost*> 107 typedef std::map<int, content::DevToolsClientHost*>
110 ConnectionToClientHostMap; 108 ConnectionToClientHostMap;
111 ConnectionToClientHostMap connection_to_client_host_ui_; 109 ConnectionToClientHostMap connection_to_client_host_ui_;
112 net::URLRequestContextGetter* request_context_getter_; 110 net::URLRequestContextGetter* request_context_getter_;
113 scoped_ptr<DevToolsHttpHandlerDelegate> delegate_; 111 scoped_ptr<DevToolsHttpHandlerDelegate> delegate_;
114 typedef std::pair<int, int> Target; 112 scoped_ptr<DevToolsHttpHandlerDelegate::BindingHandler> binding_handler_;
pfeldman 2012/04/25 05:45:15 You will often want existing class to implement th
Marshall 2012/04/25 15:14:57 Done.
115 std::vector<Target> targets_;
116 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandlerImpl); 113 DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandlerImpl);
117 }; 114 };
118 115
119 } // namespace content 116 } // namespace content
120 117
121 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_ 118 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_HTTP_HANDLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698