| 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_broker_proxy.h" | 5 #include "ppapi/proxy/ppb_broker_proxy.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
| 8 #include "ppapi/c/trusted/ppb_broker_trusted.h" | 8 #include "ppapi/c/trusted/ppb_broker_trusted.h" |
| 9 #include "ppapi/proxy/enter_proxy.h" | 9 #include "ppapi/proxy/enter_proxy.h" |
| 10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
| 11 #include "ppapi/proxy/plugin_resource.h" | 11 #include "ppapi/proxy/plugin_resource.h" |
| 12 #include "ppapi/proxy/ppapi_messages.h" | 12 #include "ppapi/proxy/ppapi_messages.h" |
| 13 #include "ppapi/thunk/ppb_broker_api.h" | 13 #include "ppapi/thunk/ppb_broker_api.h" |
| 14 #include "ppapi/thunk/enter.h" | 14 #include "ppapi/thunk/enter.h" |
| 15 #include "ppapi/thunk/thunk.h" | 15 #include "ppapi/thunk/thunk.h" |
| 16 | 16 |
| 17 using ppapi::HostResource; |
| 17 using ppapi::thunk::PPB_Broker_API; | 18 using ppapi::thunk::PPB_Broker_API; |
| 18 | 19 |
| 19 namespace pp { | 20 namespace pp { |
| 20 namespace proxy { | 21 namespace proxy { |
| 21 | 22 |
| 22 namespace { | 23 namespace { |
| 23 | 24 |
| 24 base::PlatformFile IntToPlatformFile(int32_t handle) { | 25 base::PlatformFile IntToPlatformFile(int32_t handle) { |
| 25 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
| 26 return reinterpret_cast<HANDLE>(static_cast<intptr_t>(handle)); | 27 return reinterpret_cast<HANDLE>(static_cast<intptr_t>(handle)); |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 // The easiest way to clean it up is to just put it in an object | 270 // The easiest way to clean it up is to just put it in an object |
| 270 // and then close it. This failure case is not performance critical. | 271 // and then close it. This failure case is not performance critical. |
| 271 // The handle could still leak if Send succeeded but the IPC later failed. | 272 // The handle could still leak if Send succeeded but the IPC later failed. |
| 272 base::SyncSocket temp_socket( | 273 base::SyncSocket temp_socket( |
| 273 IPC::PlatformFileForTransitToPlatformFile(foreign_socket_handle)); | 274 IPC::PlatformFileForTransitToPlatformFile(foreign_socket_handle)); |
| 274 } | 275 } |
| 275 } | 276 } |
| 276 | 277 |
| 277 } // namespace proxy | 278 } // namespace proxy |
| 278 } // namespace pp | 279 } // namespace pp |
| OLD | NEW |