| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 // Cached copy of the response info. When nonzero, we're holding a reference | 151 // Cached copy of the response info. When nonzero, we're holding a reference |
| 152 // to this resource. | 152 // to this resource. |
| 153 PP_Resource response_info_; | 153 PP_Resource response_info_; |
| 154 | 154 |
| 155 private: | 155 private: |
| 156 DISALLOW_COPY_AND_ASSIGN(URLLoader); | 156 DISALLOW_COPY_AND_ASSIGN(URLLoader); |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 URLLoader::URLLoader(const HostResource& resource) | 159 URLLoader::URLLoader(const HostResource& resource) |
| 160 : Resource(resource), | 160 : Resource(OBJECT_IS_PROXY, resource), |
| 161 bytes_sent_(-1), | 161 bytes_sent_(-1), |
| 162 total_bytes_to_be_sent_(-1), | 162 total_bytes_to_be_sent_(-1), |
| 163 bytes_received_(-1), | 163 bytes_received_(-1), |
| 164 total_bytes_to_be_received_(-1), | 164 total_bytes_to_be_received_(-1), |
| 165 current_read_buffer_(NULL), | 165 current_read_buffer_(NULL), |
| 166 current_read_buffer_size_(0), | 166 current_read_buffer_size_(0), |
| 167 response_info_(0) { | 167 response_info_(0) { |
| 168 } | 168 } |
| 169 | 169 |
| 170 URLLoader::~URLLoader() { | 170 URLLoader::~URLLoader() { |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 } | 595 } |
| 596 | 596 |
| 597 void PPB_URLLoader_Proxy::OnCallback(int32_t result, | 597 void PPB_URLLoader_Proxy::OnCallback(int32_t result, |
| 598 const HostResource& resource) { | 598 const HostResource& resource) { |
| 599 dispatcher()->Send(new PpapiMsg_PPBURLLoader_CallbackComplete( | 599 dispatcher()->Send(new PpapiMsg_PPBURLLoader_CallbackComplete( |
| 600 API_ID_PPB_URL_LOADER, resource, result)); | 600 API_ID_PPB_URL_LOADER, resource, result)); |
| 601 } | 601 } |
| 602 | 602 |
| 603 } // namespace proxy | 603 } // namespace proxy |
| 604 } // namespace ppapi | 604 } // namespace ppapi |
| OLD | NEW |