| 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 "webkit/plugins/ppapi/ppb_url_loader_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_url_loader_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
| 9 #include "ppapi/c/pp_completion_callback.h" | 9 #include "ppapi/c/pp_completion_callback.h" |
| 10 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(resource); | 60 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(resource); |
| 61 if (!plugin_instance) | 61 if (!plugin_instance) |
| 62 return NULL; | 62 return NULL; |
| 63 return plugin_instance->container()->element().document().frame(); | 63 return plugin_instance->container()->element().document().frame(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 } // namespace | 66 } // namespace |
| 67 | 67 |
| 68 PPB_URLLoader_Impl::PPB_URLLoader_Impl(PP_Instance instance, | 68 PPB_URLLoader_Impl::PPB_URLLoader_Impl(PP_Instance instance, |
| 69 bool main_document_loader) | 69 bool main_document_loader) |
| 70 : Resource(instance), | 70 : Resource(::ppapi::OBJECT_IS_IMPL, instance), |
| 71 main_document_loader_(main_document_loader), | 71 main_document_loader_(main_document_loader), |
| 72 pending_callback_(), | 72 pending_callback_(), |
| 73 bytes_sent_(0), | 73 bytes_sent_(0), |
| 74 total_bytes_to_be_sent_(-1), | 74 total_bytes_to_be_sent_(-1), |
| 75 bytes_received_(0), | 75 bytes_received_(0), |
| 76 total_bytes_to_be_received_(-1), | 76 total_bytes_to_be_received_(-1), |
| 77 user_buffer_(NULL), | 77 user_buffer_(NULL), |
| 78 user_buffer_size_(0), | 78 user_buffer_size_(0), |
| 79 done_status_(PP_OK_COMPLETIONPENDING), | 79 done_status_(PP_OK_COMPLETIONPENDING), |
| 80 is_streaming_to_file_(false), | 80 is_streaming_to_file_(false), |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 bool PPB_URLLoader_Impl::RecordDownloadProgress() const { | 475 bool PPB_URLLoader_Impl::RecordDownloadProgress() const { |
| 476 return request_data_.record_download_progress; | 476 return request_data_.record_download_progress; |
| 477 } | 477 } |
| 478 | 478 |
| 479 bool PPB_URLLoader_Impl::RecordUploadProgress() const { | 479 bool PPB_URLLoader_Impl::RecordUploadProgress() const { |
| 480 return request_data_.record_upload_progress; | 480 return request_data_.record_upload_progress; |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace ppapi | 483 } // namespace ppapi |
| 484 } // namespace webkit | 484 } // namespace webkit |
| OLD | NEW |