OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 buffer_.begin() + output_size, | 381 buffer_.begin() + output_size, |
382 static_cast<char*>(output_buffer)); | 382 static_cast<char*>(output_buffer)); |
383 buffer_.erase(buffer_.begin(), | 383 buffer_.erase(buffer_.begin(), |
384 buffer_.begin() + output_size); | 384 buffer_.begin() + output_size); |
385 } | 385 } |
386 | 386 |
387 // PPB_URLLoader_Proxy --------------------------------------------------------- | 387 // PPB_URLLoader_Proxy --------------------------------------------------------- |
388 | 388 |
389 PPB_URLLoader_Proxy::PPB_URLLoader_Proxy(Dispatcher* dispatcher) | 389 PPB_URLLoader_Proxy::PPB_URLLoader_Proxy(Dispatcher* dispatcher) |
390 : InterfaceProxy(dispatcher), | 390 : InterfaceProxy(dispatcher), |
391 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 391 callback_factory_(this) { |
392 } | 392 } |
393 | 393 |
394 PPB_URLLoader_Proxy::~PPB_URLLoader_Proxy() { | 394 PPB_URLLoader_Proxy::~PPB_URLLoader_Proxy() { |
395 } | 395 } |
396 | 396 |
397 // static | 397 // static |
398 PP_Resource PPB_URLLoader_Proxy::TrackPluginResource( | 398 PP_Resource PPB_URLLoader_Proxy::TrackPluginResource( |
399 const HostResource& url_loader_resource) { | 399 const HostResource& url_loader_resource) { |
400 return (new URLLoader(url_loader_resource))->GetReference(); | 400 return (new URLLoader(url_loader_resource))->GetReference(); |
401 } | 401 } |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
643 | 643 |
644 void PPB_URLLoader_Proxy::OnCallback(int32_t result, | 644 void PPB_URLLoader_Proxy::OnCallback(int32_t result, |
645 const HostResource& resource) { | 645 const HostResource& resource) { |
646 dispatcher()->Send(new PpapiMsg_PPBURLLoader_CallbackComplete( | 646 dispatcher()->Send(new PpapiMsg_PPBURLLoader_CallbackComplete( |
647 API_ID_PPB_URL_LOADER, resource, result)); | 647 API_ID_PPB_URL_LOADER, resource, result)); |
648 } | 648 } |
649 #endif // !defined(OS_NACL) | 649 #endif // !defined(OS_NACL) |
650 | 650 |
651 } // namespace proxy | 651 } // namespace proxy |
652 } // namespace ppapi | 652 } // namespace ppapi |
OLD | NEW |