Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKETS_HOST_H_ | |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKETS_HOST_H_ | |
| 7 | |
| 8 #include "base/id_map.h" | |
| 9 #include "chrome/common/p2p_sockets.h" | |
| 10 #include "content/browser/browser_message_filter.h" | |
| 11 | |
| 12 class P2PSocketsHost : public BrowserMessageFilter { | |
| 13 public: | |
| 14 P2PSocketsHost(); | |
| 15 virtual ~P2PSocketsHost(); | |
| 16 | |
| 17 // BrowserMessageFilter overrides. | |
| 18 virtual void OnChannelClosing(); | |
| 19 virtual void OnDestruct() const; | |
| 20 virtual bool OnMessageReceived(const IPC::Message& message, | |
| 21 bool* message_was_ok); | |
| 22 private: | |
| 23 class P2PSocket; | |
| 24 | |
| 25 void OnCreateSocket(const IPC::Message& msg, P2PSocketType type, | |
| 26 int socket_id, P2PSocketAddress remote_address); | |
| 27 void OnSend(const IPC::Message& msg, int socket_id, | |
| 28 P2PSocketAddress socket_address, | |
| 29 const std::vector<char>& data); | |
| 30 void OnDestroySocket(const IPC::Message& msg, int socket_id); | |
| 31 | |
| 32 IDMap<P2PSocket> sockets_; | |
|
jam
2011/03/01 19:35:54
DISALLOW_COPY_AND_ASSIGN?
Sergey Ulanov
2011/03/01 22:34:17
Done.
| |
| 33 }; | |
| 34 | |
| 35 #endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKETS_HOST_H_ | |
| OLD | NEW |