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

Unified Diff: mojo/spy/websocket_server.h

Issue 354043003: Add support for logging information about mojo messages retrieved by the mojo debugger (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Presubmit warnings Created 6 years, 5 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 | « mojo/spy/test/spy_repl_test.html ('k') | mojo/spy/websocket_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/spy/websocket_server.h
diff --git a/mojo/spy/websocket_server.h b/mojo/spy/websocket_server.h
index 986b5796209652b32de677cb97176ea02ce5e554..c6098decbbc3d911402f81212ad2c88be471e99b 100644
--- a/mojo/spy/websocket_server.h
+++ b/mojo/spy/websocket_server.h
@@ -7,9 +7,16 @@
#include <string>
+#include "mojo/spy/common.h"
#include "mojo/spy/public/spy.mojom.h"
#include "net/server/http_server.h"
+namespace base {
+class Time;
+};
+
+class GURL;
+
namespace mojo {
class WebSocketServer : public net::HttpServer::Delegate,
@@ -23,6 +30,12 @@ class WebSocketServer : public net::HttpServer::Delegate,
// Returns the listening port, useful if 0 was passed to the contructor.
int port() const { return port_; }
+ // Maintains a log of the message passed in.
+ void LogMessageInfo(
+ const mojo::MojoRequestHeader& message_header,
+ const GURL& url,
+ const base::Time& message_time);
+
protected:
// Overridden from net::HttpServer::Delegate.
virtual void OnHttpRequest(
@@ -47,6 +60,8 @@ class WebSocketServer : public net::HttpServer::Delegate,
// Callbacks from calling spy_api::SpyServer.
void OnStartSession(spy_api::Result, mojo::String);
+
+ bool Connected() const;
private:
int port_;
« no previous file with comments | « mojo/spy/test/spy_repl_test.html ('k') | mojo/spy/websocket_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698