| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 DebuggerAgent* agent_; | 101 DebuggerAgent* agent_; |
| 102 Socket* client_; | 102 Socket* client_; |
| 103 | 103 |
| 104 DISALLOW_COPY_AND_ASSIGN(DebuggerAgentSession); | 104 DISALLOW_COPY_AND_ASSIGN(DebuggerAgentSession); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 | 107 |
| 108 // Utility methods factored out to be used by the D8 shell as well. | 108 // Utility methods factored out to be used by the D8 shell as well. |
| 109 class DebuggerAgentUtil { | 109 class DebuggerAgentUtil { |
| 110 public: | 110 public: |
| 111 static const char* kContentLength; | 111 static const char* const kContentLength; |
| 112 static int kContentLengthSize; | 112 static const int kContentLengthSize; |
| 113 | 113 |
| 114 static SmartPointer<char> ReceiveMessage(const Socket* conn); | 114 static SmartPointer<char> ReceiveMessage(const Socket* conn); |
| 115 static bool SendConnectMessage(const Socket* conn, | 115 static bool SendConnectMessage(const Socket* conn, |
| 116 const char* embedding_host); | 116 const char* embedding_host); |
| 117 static bool SendMessage(const Socket* conn, const Vector<uint16_t> message); | 117 static bool SendMessage(const Socket* conn, const Vector<uint16_t> message); |
| 118 static bool SendMessage(const Socket* conn, | 118 static bool SendMessage(const Socket* conn, |
| 119 const v8::Handle<v8::String> message); | 119 const v8::Handle<v8::String> message); |
| 120 static int ReceiveAll(const Socket* conn, char* data, int len); | 120 static int ReceiveAll(const Socket* conn, char* data, int len); |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 } } // namespace v8::internal | 123 } } // namespace v8::internal |
| 124 | 124 |
| 125 #endif // ENABLE_DEBUGGER_SUPPORT | 125 #endif // ENABLE_DEBUGGER_SUPPORT |
| 126 | 126 |
| 127 #endif // V8_DEBUG_AGENT_H_ | 127 #endif // V8_DEBUG_AGENT_H_ |
| OLD | NEW |