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

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host_request_info.h

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 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) 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 int64 frame_id, 48 int64 frame_id,
49 bool parent_is_main_frame, 49 bool parent_is_main_frame,
50 int64 parent_frame_id, 50 int64 parent_frame_id,
51 ResourceType::Type resource_type, 51 ResourceType::Type resource_type,
52 content::PageTransition transition_type, 52 content::PageTransition transition_type,
53 uint64 upload_size, 53 uint64 upload_size,
54 bool is_download, 54 bool is_download,
55 bool allow_download, 55 bool allow_download,
56 bool has_user_gesture, 56 bool has_user_gesture,
57 WebKit::WebReferrerPolicy referrer_policy, 57 WebKit::WebReferrerPolicy referrer_policy,
58 const content::ResourceContext* context); 58 content::ResourceContext* context);
59 virtual ~ResourceDispatcherHostRequestInfo(); 59 virtual ~ResourceDispatcherHostRequestInfo();
60 60
61 // Top-level ResourceHandler servicing this request. 61 // Top-level ResourceHandler servicing this request.
62 ResourceHandler* resource_handler() { return resource_handler_.get(); } 62 ResourceHandler* resource_handler() { return resource_handler_.get(); }
63 void set_resource_handler(ResourceHandler* resource_handler); 63 void set_resource_handler(ResourceHandler* resource_handler);
64 64
65 // CrossSiteResourceHandler for this request, if it is a cross-site request. 65 // CrossSiteResourceHandler for this request, if it is a cross-site request.
66 // (NULL otherwise.) This handler is part of the chain of ResourceHandlers 66 // (NULL otherwise.) This handler is part of the chain of ResourceHandlers
67 // pointed to by resource_handler, and is not owned by this class. 67 // pointed to by resource_handler, and is not owned by this class.
68 content::CrossSiteResourceHandler* cross_site_handler() { 68 content::CrossSiteResourceHandler* cross_site_handler() {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 // We hold a reference to the requested blob data to ensure it doesn't 182 // We hold a reference to the requested blob data to ensure it doesn't
183 // get finally released prior to the net::URLRequestJob being started. 183 // get finally released prior to the net::URLRequestJob being started.
184 webkit_blob::BlobData* requested_blob_data() const { 184 webkit_blob::BlobData* requested_blob_data() const {
185 return requested_blob_data_.get(); 185 return requested_blob_data_.get();
186 } 186 }
187 void set_requested_blob_data(webkit_blob::BlobData* data); 187 void set_requested_blob_data(webkit_blob::BlobData* data);
188 188
189 WebKit::WebReferrerPolicy referrer_policy() const { return referrer_policy_; } 189 WebKit::WebReferrerPolicy referrer_policy() const { return referrer_policy_; }
190 190
191 const content::ResourceContext* context() const { return context_; } 191 content::ResourceContext* context() const { return context_; }
192 192
193 private: 193 private:
194 friend class ResourceDispatcherHost; 194 friend class ResourceDispatcherHost;
195 195
196 // Request is temporarily not handling network data. Should be used only 196 // Request is temporarily not handling network data. Should be used only
197 // by the ResourceDispatcherHost, not the event handlers (accessors are 197 // by the ResourceDispatcherHost, not the event handlers (accessors are
198 // provided for consistency with the rest of the interface). 198 // provided for consistency with the rest of the interface).
199 bool is_paused() const { return is_paused_; } 199 bool is_paused() const { return is_paused_; }
200 void set_is_paused(bool paused) { is_paused_ = paused; } 200 void set_is_paused(bool paused) { is_paused_ = paused; }
201 201
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 int pause_count_; 245 int pause_count_;
246 ResourceType::Type resource_type_; 246 ResourceType::Type resource_type_;
247 content::PageTransition transition_type_; 247 content::PageTransition transition_type_;
248 uint64 upload_size_; 248 uint64 upload_size_;
249 uint64 last_upload_position_; 249 uint64 last_upload_position_;
250 base::TimeTicks last_upload_ticks_; 250 base::TimeTicks last_upload_ticks_;
251 bool waiting_for_upload_progress_ack_; 251 bool waiting_for_upload_progress_ack_;
252 int memory_cost_; 252 int memory_cost_;
253 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; 253 scoped_refptr<webkit_blob::BlobData> requested_blob_data_;
254 WebKit::WebReferrerPolicy referrer_policy_; 254 WebKit::WebReferrerPolicy referrer_policy_;
255 const content::ResourceContext* context_; 255 content::ResourceContext* context_;
256 256
257 // "Private" data accessible only to ResourceDispatcherHost (use the 257 // "Private" data accessible only to ResourceDispatcherHost (use the
258 // accessors above for consistency). 258 // accessors above for consistency).
259 bool is_paused_; 259 bool is_paused_;
260 bool called_on_response_started_; 260 bool called_on_response_started_;
261 bool has_started_reading_; 261 bool has_started_reading_;
262 int paused_read_bytes_; 262 int paused_read_bytes_;
263 263
264 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo); 264 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostRequestInfo);
265 }; 265 };
266 266
267 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H _ 267 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_REQUEST_INFO_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698