Index: content/browser/renderer_host/p2p_socket_host.h |
diff --git a/content/browser/renderer_host/p2p_socket_host.h b/content/browser/renderer_host/p2p_socket_host.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6b7bb6b1c0b25eb3785cb44df18aa5288b162167 |
--- /dev/null |
+++ b/content/browser/renderer_host/p2p_socket_host.h |
@@ -0,0 +1,36 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
jam
2011/03/02 00:39:24
do you have your autoprops set? these new files s
Sergey Ulanov
2011/03/02 11:00:47
Yes, I do have these properties set. I use git, an
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ |
+#define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ |
+ |
+#include "content/common/p2p_sockets.h" |
+ |
+class P2PSocketsHost; |
+ |
+// Base class for P2P sockets used by P2PSocketsHost. |
+class P2PSocketHost { |
+ public: |
+ static P2PSocketHost* Create(P2PSocketsHost* host, int routing_id, int id, |
jam
2011/03/02 00:41:09
can you add a comment as to what this is, i.e. pla
Sergey Ulanov
2011/03/02 11:00:47
Done.
|
+ P2PSocketType type); |
+ |
+ P2PSocketHost(P2PSocketsHost* host, int routing_id, int id); |
jam
2011/03/02 00:41:09
if only derived classes need this, it should be pr
Sergey Ulanov
2011/03/02 11:00:47
Done.
|
+ ~P2PSocketHost(); |
+ |
+ // Initalizes the socket. Returns false when initiazations fails. |
+ virtual bool Init() = 0; |
+ |
+ virtual void Send(P2PSocketAddress socket_address, |
+ const std::vector<char>& data) = 0; |
+ virtual void DestroyConnection(P2PSocketAddress socket_address) = 0; |
+ |
+ protected: |
+ P2PSocketsHost* host_; |
+ int routing_id_; |
+ int id_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(P2PSocketHost); |
+}; |
+ |
+#endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_H_ |