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

Unified Diff: trunk/src/mojo/spy/websocket_server.h

Issue 296453021: Revert 272458 "Adding more guts to the mojo spy." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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 | « trunk/src/mojo/spy/spy_server_impl.cc ('k') | trunk/src/mojo/spy/websocket_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/mojo/spy/websocket_server.h
===================================================================
--- trunk/src/mojo/spy/websocket_server.h (revision 272462)
+++ trunk/src/mojo/spy/websocket_server.h (working copy)
@@ -5,18 +5,14 @@
#ifndef MOJO_SPY_WEBSOCKET_SERVER_H_
#define MOJO_SPY_WEBSOCKET_SERVER_H_
-#include <string>
-
-#include "mojo/spy/public/spy.mojom.h"
#include "net/server/http_server.h"
-namespace mojo {
+namespace spy {
-class WebSocketServer : public net::HttpServer::Delegate,
- public spy_api::SpyClient {
+class WebSocketServer : public net::HttpServer::Delegate {
public:
// Pass 0 in |port| to listen in one available port.
- explicit WebSocketServer(int port, ScopedMessagePipeHandle server_pipe);
+ explicit WebSocketServer(int port);
virtual ~WebSocketServer();
// Begin accepting HTTP requests. Must be called from an IO MessageLoop.
bool Start();
@@ -36,27 +32,13 @@
const std::string& data) OVERRIDE;
virtual void OnClose(int connection_id) OVERRIDE;
- // Overriden form spy_api::SpyClient.
- virtual void OnFatalError(spy_api::Result result) OVERRIDE;
- virtual void OnSessionEnd(spy_api::Result result) OVERRIDE;
- virtual void OnClientConnection(
- const mojo::String& name,
- uint32_t id,
- spy_api::ConnectionOptions options) OVERRIDE;
- virtual void OnMessage(const spy_api::Message& message) OVERRIDE;
-
- // Callbacks from calling spy_api::SpyServer.
- void OnStartSession(spy_api::Result, mojo::String);
-
private:
int port_;
int connection_id_;
- scoped_refptr<net::HttpServer> web_server_;
- spy_api::SpyServerPtr spy_server_;
-
+ scoped_refptr<net::HttpServer> server_;
DISALLOW_COPY_AND_ASSIGN(WebSocketServer);
};
-} // namespace mojo
+} // namespace spy
#endif // MOJO_SPY_WEBSOCKET_SERVER_H_
« no previous file with comments | « trunk/src/mojo/spy/spy_server_impl.cc ('k') | trunk/src/mojo/spy/websocket_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698