| 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_url_loader_proxy.h" | 5 #include "ppapi/proxy/ppb_url_loader_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), | 350 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
| 351 host_urlloader_trusted_interface_(NULL) { | 351 host_urlloader_trusted_interface_(NULL) { |
| 352 } | 352 } |
| 353 | 353 |
| 354 PPB_URLLoader_Proxy::~PPB_URLLoader_Proxy() { | 354 PPB_URLLoader_Proxy::~PPB_URLLoader_Proxy() { |
| 355 } | 355 } |
| 356 | 356 |
| 357 // static | 357 // static |
| 358 PP_Resource PPB_URLLoader_Proxy::TrackPluginResource( | 358 PP_Resource PPB_URLLoader_Proxy::TrackPluginResource( |
| 359 const HostResource& url_loader_resource) { | 359 const HostResource& url_loader_resource) { |
| 360 linked_ptr<URLLoader> object(new URLLoader(url_loader_resource)); | 360 return PluginResourceTracker::GetInstance()->AddResource( |
| 361 return PluginResourceTracker::GetInstance()->AddResource(object); | 361 new URLLoader(url_loader_resource)); |
| 362 } | 362 } |
| 363 | 363 |
| 364 // static | 364 // static |
| 365 const InterfaceProxy::Info* PPB_URLLoader_Proxy::GetInfo() { | 365 const InterfaceProxy::Info* PPB_URLLoader_Proxy::GetInfo() { |
| 366 static const Info info = { | 366 static const Info info = { |
| 367 ::ppapi::thunk::GetPPB_URLLoader_Thunk(), | 367 ::ppapi::thunk::GetPPB_URLLoader_Thunk(), |
| 368 PPB_URLLOADER_INTERFACE, | 368 PPB_URLLOADER_INTERFACE, |
| 369 INTERFACE_ID_PPB_URL_LOADER, | 369 INTERFACE_ID_PPB_URL_LOADER, |
| 370 false, | 370 false, |
| 371 &CreateURLLoaderProxy, | 371 &CreateURLLoaderProxy, |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 info->read_buffer.resize(bytes_read); | 577 info->read_buffer.resize(bytes_read); |
| 578 | 578 |
| 579 dispatcher()->Send(new PpapiMsg_PPBURLLoader_ReadResponseBody_Ack( | 579 dispatcher()->Send(new PpapiMsg_PPBURLLoader_ReadResponseBody_Ack( |
| 580 INTERFACE_ID_PPB_URL_LOADER, info->resource, result, info->read_buffer)); | 580 INTERFACE_ID_PPB_URL_LOADER, info->resource, result, info->read_buffer)); |
| 581 | 581 |
| 582 delete info; | 582 delete info; |
| 583 } | 583 } |
| 584 | 584 |
| 585 } // namespace proxy | 585 } // namespace proxy |
| 586 } // namespace pp | 586 } // namespace pp |
| OLD | NEW |