Index: content/browser/renderer_host/resource_dispatcher_host_request_info.h |
=================================================================== |
--- content/browser/renderer_host/resource_dispatcher_host_request_info.h (revision 124423) |
+++ content/browser/renderer_host/resource_dispatcher_host_request_info.h (working copy) |
@@ -10,9 +10,8 @@ |
#include "base/basictypes.h" |
#include "base/memory/ref_counted.h" |
-#include "base/supports_user_data.h" |
#include "base/time.h" |
-#include "content/common/content_export.h" |
+#include "content/public/browser/resource_request_info.h" |
#include "content/public/common/page_transition_types.h" |
#include "content/public/common/process_type.h" |
#include "content/public/common/referrer.h" |
@@ -39,7 +38,7 @@ |
// Holds the data ResourceDispatcherHost associates with each request. |
// Retrieve this data by calling ResourceDispatcherHost::InfoForRequest. |
-class ResourceDispatcherHostRequestInfo : public base::SupportsUserData::Data { |
+class ResourceDispatcherHostRequestInfo : public content::ResourceRequestInfo { |
public: |
// This will take a reference to the handler. |
CONTENT_EXPORT ResourceDispatcherHostRequestInfo( |
@@ -63,6 +62,10 @@ |
content::ResourceContext* context); |
virtual ~ResourceDispatcherHostRequestInfo(); |
+ // ResourceRequestInfo implementation: |
+ virtual bool GetAssociatedRenderView(int* render_process_id, |
+ int* render_view_id) const OVERRIDE; |
+ |
// Top-level ResourceHandler servicing this request. |
ResourceHandler* resource_handler() { return resource_handler_.get(); } |
void set_resource_handler(ResourceHandler* resource_handler); |
@@ -95,39 +98,10 @@ |
return process_type_; |
} |
- // The child process unique ID of the requestor. This duplicates the value |
- // stored on the request by SetChildProcessUniqueIDForRequest in |
- // url_request_tracking. |
- int child_id() const { return child_id_; } |
- |
- // The IPC route identifier for this request (this identifies the RenderView |
- // or like-thing in the renderer that the request gets routed to). |
- int route_id() const { return route_id_; } |
- |
// The route_id of pending request can change when it is transferred to a new |
// page (as in iframe transfer using adoptNode JS API). |
void set_route_id(int route_id) { route_id_ = route_id; } |
- // The pid of the originating process, if the request is sent on behalf of a |
- // another process. Otherwise it is 0. |
- int origin_pid() const { return origin_pid_; } |
- |
- // Unique identifier for this resource request. |
- int request_id() const { return request_id_; } |
- |
- // True if |frame_id_| represents a main frame in the RenderView. |
- bool is_main_frame() const { return is_main_frame_; } |
- |
- // Frame ID that sent this resource request. -1 if unknown / invalid. |
- int64 frame_id() const { return frame_id_; } |
- |
- // True if |parent_frame_id_| represents a main frame in the RenderView. |
- bool parent_is_main_frame() const { return parent_is_main_frame_; } |
- |
- // Frame ID of parent frame of frame that sent this resource request. |
- // -1 if unknown / invalid. |
- int64 parent_frame_id() const { return parent_frame_id_; } |
- |
// Number of messages we've sent to the renderer that we haven't gotten an |
// ACK for. This allows us to avoid having too many messages in flight. |
int pending_data_count() const { return pending_data_count_; } |
@@ -147,14 +121,8 @@ |
int pause_count() const { return pause_count_; } |
void set_pause_count(int count) { pause_count_ = count; } |
- // Identifies the type of resource, such as subframe, media, etc. |
- ResourceType::Type resource_type() const { return resource_type_; } |
- |
content::PageTransition transition_type() const { return transition_type_; } |
- // When there is upload data, this is the byte count of that data. When there |
- // is no upload, this will be 0. |
- uint64 upload_size() const { return upload_size_; } |
void set_upload_size(uint64 upload_size) { upload_size_ = upload_size; } |
// When we're uploading data, this is the the byte offset into the uploaded |
@@ -191,10 +159,6 @@ |
} |
void set_requested_blob_data(webkit_blob::BlobData* data); |
- WebKit::WebReferrerPolicy referrer_policy() const { return referrer_policy_; } |
- |
- content::ResourceContext* context() const { return context_; } |
- |
private: |
friend class ResourceDispatcherHost; |
@@ -235,29 +199,17 @@ |
scoped_refptr<content::ResourceDispatcherHostLoginDelegate> login_delegate_; |
scoped_refptr<SSLClientAuthHandler> ssl_client_auth_handler_; |
content::ProcessType process_type_; |
- int child_id_; |
- int route_id_; |
- int origin_pid_; |
- int request_id_; |
- bool is_main_frame_; |
- int64 frame_id_; |
- bool parent_is_main_frame_; |
- int64 parent_frame_id_; |
int pending_data_count_; |
bool is_download_; |
bool allow_download_; |
bool has_user_gesture_; |
int pause_count_; |
- ResourceType::Type resource_type_; |
content::PageTransition transition_type_; |
- uint64 upload_size_; |
uint64 last_upload_position_; |
base::TimeTicks last_upload_ticks_; |
bool waiting_for_upload_progress_ack_; |
int memory_cost_; |
scoped_refptr<webkit_blob::BlobData> requested_blob_data_; |
- WebKit::WebReferrerPolicy referrer_policy_; |
- content::ResourceContext* context_; |
// "Private" data accessible only to ResourceDispatcherHost (use the |
// accessors above for consistency). |