OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GLUE_PLUGINS_PEPPER_URL_LOADER_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_URL_LOADER_H_ |
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_URL_LOADER_H_ | 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_URL_LOADER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 static const PPB_URLLoader* GetInterface(); | 31 static const PPB_URLLoader* GetInterface(); |
32 | 32 |
33 // Resource overrides. | 33 // Resource overrides. |
34 URLLoader* AsURLLoader() { return this; } | 34 URLLoader* AsURLLoader() { return this; } |
35 | 35 |
36 // PPB_URLLoader implementation. | 36 // PPB_URLLoader implementation. |
37 int32_t Open(URLRequestInfo* request, PP_CompletionCallback callback); | 37 int32_t Open(URLRequestInfo* request, PP_CompletionCallback callback); |
38 int32_t FollowRedirect(PP_CompletionCallback callback); | 38 int32_t FollowRedirect(PP_CompletionCallback callback); |
39 int32_t ReadResponseBody(char* buffer, int32_t bytes_to_read, | 39 int32_t ReadResponseBody(char* buffer, int32_t bytes_to_read, |
40 PP_CompletionCallback callback); | 40 PP_CompletionCallback callback); |
| 41 int32_t FinishStreamingToFile(PP_CompletionCallback callback); |
41 void Close(); | 42 void Close(); |
42 | 43 |
43 // WebKit::WebURLLoaderClient implementation. | 44 // WebKit::WebURLLoaderClient implementation. |
44 virtual void willSendRequest(WebKit::WebURLLoader* loader, | 45 virtual void willSendRequest(WebKit::WebURLLoader* loader, |
45 WebKit::WebURLRequest& new_request, | 46 WebKit::WebURLRequest& new_request, |
46 const WebKit::WebURLResponse& redir_response); | 47 const WebKit::WebURLResponse& redir_response); |
47 virtual void didSendData(WebKit::WebURLLoader* loader, | 48 virtual void didSendData(WebKit::WebURLLoader* loader, |
48 unsigned long long bytes_sent, | 49 unsigned long long bytes_sent, |
49 unsigned long long total_bytes_to_be_sent); | 50 unsigned long long total_bytes_to_be_sent); |
50 virtual void didReceiveResponse(WebKit::WebURLLoader* loader, | 51 virtual void didReceiveResponse(WebKit::WebURLLoader* loader, |
(...skipping 25 matching lines...) Expand all Loading... |
76 scoped_ptr<WebKit::WebURLLoader> loader_; | 77 scoped_ptr<WebKit::WebURLLoader> loader_; |
77 scoped_refptr<URLResponseInfo> response_info_; | 78 scoped_refptr<URLResponseInfo> response_info_; |
78 PP_CompletionCallback pending_callback_; | 79 PP_CompletionCallback pending_callback_; |
79 std::deque<char> buffer_; | 80 std::deque<char> buffer_; |
80 int64_t bytes_sent_; | 81 int64_t bytes_sent_; |
81 int64_t total_bytes_to_be_sent_; | 82 int64_t total_bytes_to_be_sent_; |
82 int64_t bytes_received_; | 83 int64_t bytes_received_; |
83 int64_t total_bytes_to_be_received_; | 84 int64_t total_bytes_to_be_received_; |
84 char* user_buffer_; | 85 char* user_buffer_; |
85 size_t user_buffer_size_; | 86 size_t user_buffer_size_; |
86 bool done_; | 87 int32_t done_status_; |
87 }; | 88 }; |
88 | 89 |
89 } // namespace pepper | 90 } // namespace pepper |
90 | 91 |
91 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_LOADER_H_ | 92 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_URL_LOADER_H_ |
OLD | NEW |