OLD | NEW |
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_REQUEST_INFO_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 virtual int GetOriginPID() const OVERRIDE; | 70 virtual int GetOriginPID() const OVERRIDE; |
71 virtual int GetRequestID() const OVERRIDE; | 71 virtual int GetRequestID() const OVERRIDE; |
72 virtual bool IsMainFrame() const OVERRIDE; | 72 virtual bool IsMainFrame() const OVERRIDE; |
73 virtual int64 GetFrameID() const OVERRIDE; | 73 virtual int64 GetFrameID() const OVERRIDE; |
74 virtual bool ParentIsMainFrame() const OVERRIDE; | 74 virtual bool ParentIsMainFrame() const OVERRIDE; |
75 virtual int64 GetParentFrameID() const OVERRIDE; | 75 virtual int64 GetParentFrameID() const OVERRIDE; |
76 virtual ResourceType::Type GetResourceType() const OVERRIDE; | 76 virtual ResourceType::Type GetResourceType() const OVERRIDE; |
77 virtual WebKit::WebReferrerPolicy GetReferrerPolicy() const OVERRIDE; | 77 virtual WebKit::WebReferrerPolicy GetReferrerPolicy() const OVERRIDE; |
78 virtual uint64 GetUploadSize() const OVERRIDE; | 78 virtual uint64 GetUploadSize() const OVERRIDE; |
79 virtual bool HasUserGesture() const OVERRIDE; | 79 virtual bool HasUserGesture() const OVERRIDE; |
| 80 virtual bool GetHandledExternally() const OVERRIDE; |
80 virtual bool GetAssociatedRenderView(int* render_process_id, | 81 virtual bool GetAssociatedRenderView(int* render_process_id, |
81 int* render_view_id) const OVERRIDE; | 82 int* render_view_id) const OVERRIDE; |
82 | 83 |
83 void AssociateWithRequest(net::URLRequest* request); | 84 void AssociateWithRequest(net::URLRequest* request); |
84 | 85 |
85 GlobalRequestID GetGlobalRequestID() const; | 86 GlobalRequestID GetGlobalRequestID() const; |
86 | 87 |
87 // CrossSiteResourceHandler for this request. May be null. | 88 // CrossSiteResourceHandler for this request. May be null. |
88 CrossSiteResourceHandler* cross_site_handler() { | 89 CrossSiteResourceHandler* cross_site_handler() { |
89 return cross_site_handler_; | 90 return cross_site_handler_; |
(...skipping 24 matching lines...) Expand all Loading... |
114 | 115 |
115 PageTransition transition_type() const { return transition_type_; } | 116 PageTransition transition_type() const { return transition_type_; } |
116 | 117 |
117 void set_upload_size(uint64 upload_size) { upload_size_ = upload_size; } | 118 void set_upload_size(uint64 upload_size) { upload_size_ = upload_size; } |
118 | 119 |
119 // The approximate in-memory size (bytes) that we credited this request | 120 // The approximate in-memory size (bytes) that we credited this request |
120 // as consuming in |outstanding_requests_memory_cost_map_|. | 121 // as consuming in |outstanding_requests_memory_cost_map_|. |
121 int memory_cost() const { return memory_cost_; } | 122 int memory_cost() const { return memory_cost_; } |
122 void set_memory_cost(int cost) { memory_cost_ = cost; } | 123 void set_memory_cost(int cost) { memory_cost_ = cost; } |
123 | 124 |
| 125 bool handled_externally() const { return handled_externally_; } |
| 126 void set_handled_externally(bool value) { handled_externally_ = value; } |
| 127 |
124 // We hold a reference to the requested blob data to ensure it doesn't | 128 // We hold a reference to the requested blob data to ensure it doesn't |
125 // get finally released prior to the net::URLRequestJob being started. | 129 // get finally released prior to the net::URLRequestJob being started. |
126 webkit_blob::BlobData* requested_blob_data() const { | 130 webkit_blob::BlobData* requested_blob_data() const { |
127 return requested_blob_data_.get(); | 131 return requested_blob_data_.get(); |
128 } | 132 } |
129 void set_requested_blob_data(webkit_blob::BlobData* data); | 133 void set_requested_blob_data(webkit_blob::BlobData* data); |
130 | 134 |
131 private: | 135 private: |
132 // Non-owning, may be NULL. | 136 // Non-owning, may be NULL. |
133 CrossSiteResourceHandler* cross_site_handler_; | 137 CrossSiteResourceHandler* cross_site_handler_; |
134 AsyncResourceHandler* async_handler_; | 138 AsyncResourceHandler* async_handler_; |
135 | 139 |
136 ProcessType process_type_; | 140 ProcessType process_type_; |
137 int child_id_; | 141 int child_id_; |
138 int route_id_; | 142 int route_id_; |
139 int origin_pid_; | 143 int origin_pid_; |
140 int request_id_; | 144 int request_id_; |
141 bool is_main_frame_; | 145 bool is_main_frame_; |
142 int64 frame_id_; | 146 int64 frame_id_; |
143 bool parent_is_main_frame_; | 147 bool parent_is_main_frame_; |
144 int64 parent_frame_id_; | 148 int64 parent_frame_id_; |
145 bool is_download_; | 149 bool is_download_; |
146 bool allow_download_; | 150 bool allow_download_; |
147 bool has_user_gesture_; | 151 bool has_user_gesture_; |
148 ResourceType::Type resource_type_; | 152 ResourceType::Type resource_type_; |
149 PageTransition transition_type_; | 153 PageTransition transition_type_; |
150 uint64 upload_size_; | 154 uint64 upload_size_; |
151 int memory_cost_; | 155 int memory_cost_; |
| 156 bool handled_externally_; |
152 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; | 157 scoped_refptr<webkit_blob::BlobData> requested_blob_data_; |
153 WebKit::WebReferrerPolicy referrer_policy_; | 158 WebKit::WebReferrerPolicy referrer_policy_; |
154 ResourceContext* context_; | 159 ResourceContext* context_; |
155 | 160 |
156 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 161 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
157 }; | 162 }; |
158 | 163 |
159 } // namespace content | 164 } // namespace content |
160 | 165 |
161 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ | 166 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_REQUEST_INFO_IMPL_H_ |
OLD | NEW |