OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ppapi/proxy/ppb_flash_tcp_socket_proxy.h" | 5 #include "ppapi/proxy/ppb_flash_tcp_socket_proxy.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstring> | 8 #include <cstring> |
9 #include <map> | 9 #include <map> |
10 | 10 |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
14 #include "base/task.h" | 14 #include "base/task.h" |
15 #include "ppapi/c/pp_errors.h" | 15 #include "ppapi/c/pp_errors.h" |
16 #include "ppapi/proxy/plugin_dispatcher.h" | 16 #include "ppapi/proxy/plugin_dispatcher.h" |
17 #include "ppapi/proxy/plugin_resource.h" | 17 #include "ppapi/proxy/plugin_resource.h" |
18 #include "ppapi/proxy/plugin_resource_tracker.h" | 18 #include "ppapi/proxy/plugin_resource_tracker.h" |
19 #include "ppapi/proxy/ppapi_messages.h" | 19 #include "ppapi/proxy/ppapi_messages.h" |
20 #include "ppapi/thunk/ppb_flash_tcp_socket_api.h" | 20 #include "ppapi/thunk/ppb_flash_tcp_socket_api.h" |
21 #include "ppapi/thunk/thunk.h" | 21 #include "ppapi/thunk/thunk.h" |
22 | 22 |
| 23 using ppapi::HostResource; |
23 using ppapi::thunk::PPB_Flash_TCPSocket_API; | 24 using ppapi::thunk::PPB_Flash_TCPSocket_API; |
24 | 25 |
25 namespace pp { | 26 namespace pp { |
26 namespace proxy { | 27 namespace proxy { |
27 | 28 |
28 const int32_t kFlashTCPSocketMaxReadSize = 1024 * 1024; | 29 const int32_t kFlashTCPSocketMaxReadSize = 1024 * 1024; |
29 const int32_t kFlashTCPSocketMaxWriteSize = 1024 * 1024; | 30 const int32_t kFlashTCPSocketMaxWriteSize = 1024 * 1024; |
30 | 31 |
31 class FlashTCPSocket; | 32 class FlashTCPSocket; |
32 | 33 |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 return; | 429 return; |
429 } | 430 } |
430 IDToSocketMap::iterator iter = g_id_to_socket->find(socket_id); | 431 IDToSocketMap::iterator iter = g_id_to_socket->find(socket_id); |
431 if (iter == g_id_to_socket->end()) | 432 if (iter == g_id_to_socket->end()) |
432 return; | 433 return; |
433 iter->second->OnWriteCompleted(succeeded, bytes_written); | 434 iter->second->OnWriteCompleted(succeeded, bytes_written); |
434 } | 435 } |
435 | 436 |
436 } // namespace proxy | 437 } // namespace proxy |
437 } // namespace pp | 438 } // namespace pp |
OLD | NEW |