| 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 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" | 13 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" |
| 14 #include "ppapi/shared_impl/ppb_url_request_info_shared.h" | 14 #include "ppapi/shared_impl/ppb_url_request_info_shared.h" |
| 15 #include "ppapi/shared_impl/resource.h" | 15 #include "ppapi/shared_impl/resource.h" |
| 16 #include "ppapi/shared_impl/tracked_callback.h" |
| 16 #include "ppapi/thunk/ppb_url_loader_api.h" | 17 #include "ppapi/thunk/ppb_url_loader_api.h" |
| 17 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader
Client.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader
Client.h" |
| 18 #include "webkit/plugins/ppapi/callbacks.h" | |
| 19 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 19 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 20 | 20 |
| 21 namespace WebKit { | 21 namespace WebKit { |
| 22 class WebURL; | 22 class WebURL; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace webkit { | 25 namespace webkit { |
| 26 namespace ppapi { | 26 namespace ppapi { |
| 27 | 27 |
| 28 class PPB_URLResponseInfo_Impl; | 28 class PPB_URLResponseInfo_Impl; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // The loader associated with this request. MAY BE NULL. | 133 // The loader associated with this request. MAY BE NULL. |
| 134 // | 134 // |
| 135 // This will be NULL if the load hasn't been opened yet, or if this is a main | 135 // This will be NULL if the load hasn't been opened yet, or if this is a main |
| 136 // document loader (when registered as a mime type). Therefore, you should | 136 // document loader (when registered as a mime type). Therefore, you should |
| 137 // always NULL check this value before using it. In the case of a main | 137 // always NULL check this value before using it. In the case of a main |
| 138 // document load, you would call the functions on the document to cancel the | 138 // document load, you would call the functions on the document to cancel the |
| 139 // load, etc. since there is no loader. | 139 // load, etc. since there is no loader. |
| 140 scoped_ptr<WebKit::WebURLLoader> loader_; | 140 scoped_ptr<WebKit::WebURLLoader> loader_; |
| 141 | 141 |
| 142 scoped_refptr<PPB_URLResponseInfo_Impl> response_info_; | 142 scoped_refptr<PPB_URLResponseInfo_Impl> response_info_; |
| 143 scoped_refptr<TrackedCompletionCallback> pending_callback_; | 143 scoped_refptr< ::ppapi::TrackedCallback> pending_callback_; |
| 144 std::deque<char> buffer_; | 144 std::deque<char> buffer_; |
| 145 int64_t bytes_sent_; | 145 int64_t bytes_sent_; |
| 146 int64_t total_bytes_to_be_sent_; | 146 int64_t total_bytes_to_be_sent_; |
| 147 int64_t bytes_received_; | 147 int64_t bytes_received_; |
| 148 int64_t total_bytes_to_be_received_; | 148 int64_t total_bytes_to_be_received_; |
| 149 char* user_buffer_; | 149 char* user_buffer_; |
| 150 size_t user_buffer_size_; | 150 size_t user_buffer_size_; |
| 151 int32_t done_status_; | 151 int32_t done_status_; |
| 152 bool is_streaming_to_file_; | 152 bool is_streaming_to_file_; |
| 153 bool is_asynchronous_load_suspended_; | 153 bool is_asynchronous_load_suspended_; |
| 154 | 154 |
| 155 bool has_universal_access_; | 155 bool has_universal_access_; |
| 156 | 156 |
| 157 PP_URLLoaderTrusted_StatusCallback status_callback_; | 157 PP_URLLoaderTrusted_StatusCallback status_callback_; |
| 158 | 158 |
| 159 DISALLOW_COPY_AND_ASSIGN(PPB_URLLoader_Impl); | 159 DISALLOW_COPY_AND_ASSIGN(PPB_URLLoader_Impl); |
| 160 }; | 160 }; |
| 161 | 161 |
| 162 } // namespace ppapi | 162 } // namespace ppapi |
| 163 } // namespace webkit | 163 } // namespace webkit |
| 164 | 164 |
| 165 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ | 165 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ |
| OLD | NEW |