Chromium Code Reviews| 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..04f862cc2204eba6931a8932029461250a6fc316 |
| --- /dev/null |
| +++ b/content/browser/renderer_host/p2p_sockets_host.h |
| @@ -0,0 +1,35 @@ |
| +// 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 "chrome/common/p2p_sockets.h" |
| +#include "content/browser/browser_message_filter.h" |
| + |
| +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: |
| + class P2PSocket; |
| + |
| + 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<P2PSocket> sockets_; |
|
jam
2011/03/01 19:35:54
DISALLOW_COPY_AND_ASSIGN?
Sergey Ulanov
2011/03/01 22:34:17
Done.
|
| +}; |
| + |
| +#endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKETS_HOST_H_ |