Chromium Code Reviews| Index: content/browser/debugger/devtools_http_handler_impl.h |
| diff --git a/content/browser/debugger/devtools_http_handler_impl.h b/content/browser/debugger/devtools_http_handler_impl.h |
| index c912b927d4c6eab3b7299b8e5f94cf4a4a566afc..c18ff30a2382706b3ad2bcb37b4c75da3c5780eb 100644 |
| --- a/content/browser/debugger/devtools_http_handler_impl.h |
| +++ b/content/browser/debugger/devtools_http_handler_impl.h |
| @@ -32,14 +32,36 @@ class URLRequestContextGetter; |
| namespace content { |
| +class DevToolsBrowserTarget; |
| class DevToolsClientHost; |
| class RenderViewHost; |
| +class DevToolsServerSender { |
| + public: |
| + DevToolsServerSender() {} |
| + |
| + virtual void SendJson(int connection_id, |
|
pfeldman
2012/12/12 20:17:12
I think you should make handler return resulting m
bulach
2012/12/13 17:36:23
Done.
|
| + net::HttpStatusCode status_code, |
| + base::Value* value, |
| + const std::string& message, |
| + const std::string& jsonp) = 0; |
| + virtual void Send200(int connection_id, |
| + const std::string& data, |
| + const std::string& mime_type) = 0; |
| + virtual void Send404(int connection_id) = 0; |
| + virtual void Send500(int connection_id, |
| + const std::string& message) = 0; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(DevToolsServerSender); |
| +}; |
| + |
| class DevToolsHttpHandlerImpl |
| : public DevToolsHttpHandler, |
| public NotificationObserver, |
| public base::RefCountedThreadSafe<DevToolsHttpHandlerImpl>, |
| - public net::HttpServer::Delegate { |
| + public net::HttpServer::Delegate, |
| + public DevToolsServerSender { |
| private: |
| struct PageInfo; |
| typedef std::vector<PageInfo> PageList; |
| @@ -79,12 +101,14 @@ class DevToolsHttpHandlerImpl |
| void OnJsonRequestUI(int connection_id, |
| const net::HttpServerRequestInfo& info); |
| void OnThumbnailRequestUI(int connection_id, |
| - const net::HttpServerRequestInfo& info); |
| + const net::HttpServerRequestInfo& info); |
| void OnDiscoveryPageRequestUI(int connection_id); |
| void OnWebSocketRequestUI(int connection_id, |
| const net::HttpServerRequestInfo& info); |
| void OnWebSocketMessageUI(int connection_id, const std::string& data); |
| + void OnTraceRequestUI(int connection_id, |
|
pfeldman
2012/12/12 20:17:12
No need for this now.
bulach
2012/12/13 17:36:23
Done.
|
| + const net::HttpServerRequestInfo& info); |
| void OnCloseUI(int connection_id); |
| void ResetHandlerThread(); |
| @@ -96,17 +120,17 @@ class DevToolsHttpHandlerImpl |
| void StartHandlerThread(); |
| void StopHandlerThread(); |
| - void SendJson(int connection_id, |
| - net::HttpStatusCode status_code, |
| - base::Value* value, |
| - const std::string& message, |
| - const std::string& jsonp); |
| - void Send200(int connection_id, |
| - const std::string& data, |
| - const std::string& mime_type); |
| - void Send404(int connection_id); |
| - void Send500(int connection_id, |
| - const std::string& message); |
| + virtual void SendJson(int connection_id, |
| + net::HttpStatusCode status_code, |
| + base::Value* value, |
| + const std::string& message, |
| + const std::string& jsonp) OVERRIDE; |
| + virtual void Send200(int connection_id, |
| + const std::string& data, |
| + const std::string& mime_type) OVERRIDE; |
| + virtual void Send404(int connection_id) OVERRIDE; |
| + virtual void Send500(int connection_id, |
| + const std::string& message) OVERRIDE; |
| void AcceptWebSocket(int connection_id, |
| const net::HttpServerRequestInfo& request); |
| @@ -133,6 +157,7 @@ class DevToolsHttpHandlerImpl |
| RenderViewHostBinding* binding_; |
| scoped_ptr<RenderViewHostBinding> default_binding_; |
| NotificationRegistrar registrar_; |
| + scoped_ptr<DevToolsBrowserTarget> browser_target_; |
| DISALLOW_COPY_AND_ASSIGN(DevToolsHttpHandlerImpl); |
| }; |