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

Side by Side Diff: webkit/plugins/ppapi/ppb_url_loader_impl.h

Issue 7706021: Convert FileRefImpl and URLRequestInfo to shared_impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests fixed Created 9 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
OLDNEW
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/resource.h" 14 #include "ppapi/shared_impl/resource.h"
15 #include "ppapi/shared_impl/url_request_info_impl.h"
15 #include "ppapi/thunk/ppb_url_loader_api.h" 16 #include "ppapi/thunk/ppb_url_loader_api.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h"
17 #include "webkit/plugins/ppapi/callbacks.h" 18 #include "webkit/plugins/ppapi/callbacks.h"
18 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 19 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
19 20
20 namespace WebKit { 21 namespace WebKit {
21 class WebFrame; 22 class WebFrame;
22 class WebURL; 23 class WebURL;
23 } 24 }
24 25
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // even when it would be easier just to return it and not check, so that 115 // even when it would be easier just to return it and not check, so that
115 // plugins don't depend on access without setting the flag. 116 // plugins don't depend on access without setting the flag.
116 bool RecordDownloadProgress() const; 117 bool RecordDownloadProgress() const;
117 bool RecordUploadProgress() const; 118 bool RecordUploadProgress() const;
118 119
119 void FinishLoading(int32_t done_status); 120 void FinishLoading(int32_t done_status);
120 121
121 // If true, then the plugin instance is a full-frame plugin and we're just 122 // If true, then the plugin instance is a full-frame plugin and we're just
122 // wrapping the main document's loader (i.e. loader_ is null). 123 // wrapping the main document's loader (i.e. loader_ is null).
123 bool main_document_loader_; 124 bool main_document_loader_;
125
126 // Keep a copy of the request data. We specifically do this instead of
127 // keeping a reference to the request resource, because the plugin might
128 // change the request info resource out from under us.
129 ::ppapi::PPB_URLRequestInfo_Data request_data_;
130
124 scoped_ptr<WebKit::WebURLLoader> loader_; 131 scoped_ptr<WebKit::WebURLLoader> loader_;
125 scoped_refptr<PPB_URLRequestInfo_Impl> request_info_;
126 scoped_refptr<PPB_URLResponseInfo_Impl> response_info_; 132 scoped_refptr<PPB_URLResponseInfo_Impl> response_info_;
127 scoped_refptr<TrackedCompletionCallback> pending_callback_; 133 scoped_refptr<TrackedCompletionCallback> pending_callback_;
128 std::deque<char> buffer_; 134 std::deque<char> buffer_;
129 int64_t bytes_sent_; 135 int64_t bytes_sent_;
130 int64_t total_bytes_to_be_sent_; 136 int64_t total_bytes_to_be_sent_;
131 int64_t bytes_received_; 137 int64_t bytes_received_;
132 int64_t total_bytes_to_be_received_; 138 int64_t total_bytes_to_be_received_;
133 char* user_buffer_; 139 char* user_buffer_;
134 size_t user_buffer_size_; 140 size_t user_buffer_size_;
135 int32_t done_status_; 141 int32_t done_status_;
136 bool is_streaming_to_file_; 142 bool is_streaming_to_file_;
137 bool is_asynchronous_load_suspended_; 143 bool is_asynchronous_load_suspended_;
138 144
139 bool has_universal_access_; 145 bool has_universal_access_;
140 146
141 PP_URLLoaderTrusted_StatusCallback status_callback_; 147 PP_URLLoaderTrusted_StatusCallback status_callback_;
142 148
143 DISALLOW_COPY_AND_ASSIGN(PPB_URLLoader_Impl); 149 DISALLOW_COPY_AND_ASSIGN(PPB_URLLoader_Impl);
144 }; 150 };
145 151
146 } // namespace ppapi 152 } // namespace ppapi
147 } // namespace webkit 153 } // namespace webkit
148 154
149 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_ 155 #endif // WEBKIT_PLUGINS_PPAPI_PPB_URL_LOADER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698