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

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: Code review comments Created 6 years, 6 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
Index: mojo/spy/websocket_server.h
diff --git a/mojo/spy/websocket_server.h b/mojo/spy/websocket_server.h
index 84830b8b8dad3f21499952e610fa05df5dc235d6..75c2e97a5dc2d8d3e0c55aadd522391409ef9487 100644
--- a/mojo/spy/websocket_server.h
+++ b/mojo/spy/websocket_server.h
@@ -5,8 +5,15 @@
#ifndef MOJO_SPY_WEBSOCKET_SERVER_H_
#define MOJO_SPY_WEBSOCKET_SERVER_H_
+#include "mojo/spy/common.h"
#include "net/server/http_server.h"
+namespace base {
+class Time;
+};
viettrungluu 2014/06/30 19:16:55 No ';'.
+
+class GURL;
+
namespace spy {
class WebSocketServer : public net::HttpServer::Delegate {
@@ -19,6 +26,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::MojoMessageHeader& message_header,
+ const GURL& url,
+ const base::Time& message_time);
+
protected:
// Overridden from net::HttpServer::Delegate.
virtual void OnHttpRequest(
@@ -32,6 +45,8 @@ class WebSocketServer : public net::HttpServer::Delegate {
const std::string& data) OVERRIDE;
virtual void OnClose(int connection_id) OVERRIDE;
+ bool Connected() const;
+
private:
int port_;
int connection_id_;

Powered by Google App Engine
This is Rietveld 408576698