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

Unified Diff: content/browser/renderer_host/p2p_sockets_host.h

Issue 6598053: P2P Sockets host implementation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: - Created 9 years, 10 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
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_
« no previous file with comments | « content/browser/renderer_host/p2p_socket_host_win.cc ('k') | content/browser/renderer_host/p2p_sockets_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698