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

Unified Diff: content/browser/debugger/devtools_http_handler_impl.h

Issue 11548032: Telemetry / Devtools TraceHandler: exposes tracing via dev tools. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WIP! DONT SUBMIT. Created 8 years 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
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);
};

Powered by Google App Engine
This is Rietveld 408576698