Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: webkit/glue/plugins/pepper_url_loader.h

Issue 2806079: Stream to file implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | webkit/glue/plugins/pepper_url_loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | webkit/glue/plugins/pepper_url_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698