| 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_net_connector_proxy.h" | 5 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/c/private/ppb_flash_net_connector.h" | 10 #include "ppapi/c/private/ppb_flash_net_connector.h" |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 PPB_Flash_NetConnector_Proxy::PPB_Flash_NetConnector_Proxy( | 198 PPB_Flash_NetConnector_Proxy::PPB_Flash_NetConnector_Proxy( |
| 199 Dispatcher* dispatcher) | 199 Dispatcher* dispatcher) |
| 200 : InterfaceProxy(dispatcher), | 200 : InterfaceProxy(dispatcher), |
| 201 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 201 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
| 202 } | 202 } |
| 203 | 203 |
| 204 PPB_Flash_NetConnector_Proxy::~PPB_Flash_NetConnector_Proxy() { | 204 PPB_Flash_NetConnector_Proxy::~PPB_Flash_NetConnector_Proxy() { |
| 205 } | 205 } |
| 206 | 206 |
| 207 // static | 207 // static |
| 208 const InterfaceProxy::Info* PPB_Flash_NetConnector_Proxy::GetInfo() { | |
| 209 static const Info info = { | |
| 210 ppapi::thunk::GetPPB_Flash_NetConnector_Thunk(), | |
| 211 PPB_FLASH_NETCONNECTOR_INTERFACE, | |
| 212 API_ID_PPB_FLASH_NETCONNECTOR, | |
| 213 false, | |
| 214 &CreateFlashNetConnectorProxy | |
| 215 }; | |
| 216 return &info; | |
| 217 } | |
| 218 | |
| 219 // static | |
| 220 PP_Resource PPB_Flash_NetConnector_Proxy::CreateProxyResource( | 208 PP_Resource PPB_Flash_NetConnector_Proxy::CreateProxyResource( |
| 221 PP_Instance instance) { | 209 PP_Instance instance) { |
| 222 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); | 210 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); |
| 223 if (!dispatcher) | 211 if (!dispatcher) |
| 224 return 0; | 212 return 0; |
| 225 | 213 |
| 226 HostResource result; | 214 HostResource result; |
| 227 dispatcher->Send(new PpapiHostMsg_PPBFlashNetConnector_Create( | 215 dispatcher->Send(new PpapiHostMsg_PPBFlashNetConnector_Create( |
| 228 API_ID_PPB_FLASH_NETCONNECTOR, instance, &result)); | 216 API_ID_PPB_FLASH_NETCONNECTOR, instance, &result)); |
| 229 if (result.is_null()) | 217 if (result.is_null()) |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 } else { | 321 } else { |
| 334 dispatcher()->Send(new PpapiMsg_PPBFlashNetConnector_ConnectACK( | 322 dispatcher()->Send(new PpapiMsg_PPBFlashNetConnector_ConnectACK( |
| 335 API_ID_PPB_FLASH_NETCONNECTOR, | 323 API_ID_PPB_FLASH_NETCONNECTOR, |
| 336 info->resource, result, | 324 info->resource, result, |
| 337 IPC::InvalidPlatformFileForTransit(), std::string(), std::string())); | 325 IPC::InvalidPlatformFileForTransit(), std::string(), std::string())); |
| 338 } | 326 } |
| 339 } | 327 } |
| 340 | 328 |
| 341 } // namespace proxy | 329 } // namespace proxy |
| 342 } // namespace ppapi | 330 } // namespace ppapi |
| OLD | NEW |