Index: content/browser/renderer_host/p2p_sockets_host.h |
diff --git a/content/browser/renderer_host/p2p_sockets_host.h b/content/browser/renderer_host/p2p_sockets_host.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9d965ebb9fc80d43563d919499d97f731531039e |
--- /dev/null |
+++ b/content/browser/renderer_host/p2p_sockets_host.h |
@@ -0,0 +1,38 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// 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_SOCKETS_HOST_H_ |
+#define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKETS_HOST_H_ |
+ |
+#include "base/id_map.h" |
+#include "content/browser/browser_message_filter.h" |
+#include "content/common/p2p_sockets.h" |
+ |
+class P2PSocketHost; |
+ |
+class P2PSocketsHost : public BrowserMessageFilter { |
+ public: |
+ P2PSocketsHost(); |
+ virtual ~P2PSocketsHost(); |
+ |
+ // BrowserMessageFilter overrides. |
+ virtual void OnChannelClosing(); |
+ virtual void OnDestruct() const; |
+ virtual bool OnMessageReceived(const IPC::Message& message, |
+ bool* message_was_ok); |
+ |
+ private: |
+ void OnCreateSocket(const IPC::Message& msg, P2PSocketType type, |
+ int socket_id, P2PSocketAddress remote_address); |
+ void OnSend(const IPC::Message& msg, int socket_id, |
+ P2PSocketAddress socket_address, |
+ const std::vector<char>& data); |
+ void OnDestroySocket(const IPC::Message& msg, int socket_id); |
+ |
+ IDMap<P2PSocketHost> sockets_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(P2PSocketsHost); |
+}; |
+ |
+#endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKETS_HOST_H_ |