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

Unified Diff: src/debug-agent.h

Issue 52012: Extend debugger agent protocol with a connect message (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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 | « src/debug.cc ('k') | src/debug-agent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-agent.h
===================================================================
--- src/debug-agent.h (revision 1572)
+++ src/debug-agent.h (working copy)
@@ -42,8 +42,9 @@
// handles connection from a remote debugger.
class DebuggerAgent: public Thread {
public:
- explicit DebuggerAgent(int port)
- : port_(port), server_(OS::CreateSocket()), terminate_(false),
+ explicit DebuggerAgent(const char* name, int port)
+ : port_(port), name_(StrDup(name)),
+ server_(OS::CreateSocket()), terminate_(false),
session_access_(OS::CreateMutex()), session_(NULL),
terminate_now_(OS::CreateSemaphore(0)) {}
~DebuggerAgent() { delete server_; }
@@ -57,6 +58,7 @@
void CloseSession();
void OnSessionClosed(DebuggerAgentSession* session);
+ SmartPointer<const char> name_; // Name of the embedding application.
int port_; // Port to use for the agent.
Socket* server_; // Server socket for listen/accept.
bool terminate_; // Termination flag.
@@ -101,6 +103,8 @@
static int kContentLengthSize;
static SmartPointer<char> ReceiveMessage(const Socket* conn);
+ static bool SendConnectMessage(const Socket* conn,
+ const char* embedding_host);
static bool SendMessage(const Socket* conn, const Vector<uint16_t> message);
static bool SendMessage(const Socket* conn,
const v8::Handle<v8::String> message);
« no previous file with comments | « src/debug.cc ('k') | src/debug-agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698