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_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 6 #define CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 CONTENT_EXPORT ResourceRequestInfoImpl( | 42 CONTENT_EXPORT ResourceRequestInfoImpl( |
43 int process_type, | 43 int process_type, |
44 int child_id, | 44 int child_id, |
45 int route_id, | 45 int route_id, |
46 int frame_tree_node_id, | 46 int frame_tree_node_id, |
47 int origin_pid, | 47 int origin_pid, |
48 int request_id, | 48 int request_id, |
49 int render_frame_id, | 49 int render_frame_id, |
50 bool is_main_frame, | 50 bool is_main_frame, |
51 bool parent_is_main_frame, | 51 bool parent_is_main_frame, |
52 int parent_render_frame_id, | |
53 ResourceType resource_type, | 52 ResourceType resource_type, |
54 ui::PageTransition transition_type, | 53 ui::PageTransition transition_type, |
55 bool should_replace_current_entry, | 54 bool should_replace_current_entry, |
56 bool is_download, | 55 bool is_download, |
57 bool is_stream, | 56 bool is_stream, |
58 bool allow_download, | 57 bool allow_download, |
59 bool has_user_gesture, | 58 bool has_user_gesture, |
60 bool enable_load_timing, | 59 bool enable_load_timing, |
61 bool enable_upload_progress, | 60 bool enable_upload_progress, |
62 bool do_not_prompt_for_login, | 61 bool do_not_prompt_for_login, |
63 blink::WebReferrerPolicy referrer_policy, | 62 blink::WebReferrerPolicy referrer_policy, |
64 blink::WebPageVisibilityState visibility_state, | 63 blink::WebPageVisibilityState visibility_state, |
65 ResourceContext* context, | 64 ResourceContext* context, |
66 base::WeakPtr<ResourceMessageFilter> filter, | 65 base::WeakPtr<ResourceMessageFilter> filter, |
67 bool report_raw_headers, | 66 bool report_raw_headers, |
68 bool is_async); | 67 bool is_async); |
69 ~ResourceRequestInfoImpl() override; | 68 ~ResourceRequestInfoImpl() override; |
70 | 69 |
71 // ResourceRequestInfo implementation: | 70 // ResourceRequestInfo implementation: |
72 ResourceContext* GetContext() const override; | 71 ResourceContext* GetContext() const override; |
73 int GetChildID() const override; | 72 int GetChildID() const override; |
74 int GetRouteID() const override; | 73 int GetRouteID() const override; |
75 int GetOriginPID() const override; | 74 int GetOriginPID() const override; |
76 int GetRequestID() const override; | 75 int GetRequestID() const override; |
77 int GetRenderFrameID() const override; | 76 int GetRenderFrameID() const override; |
78 bool IsMainFrame() const override; | 77 bool IsMainFrame() const override; |
79 bool ParentIsMainFrame() const override; | 78 bool ParentIsMainFrame() const override; |
80 int GetParentRenderFrameID() const override; | |
81 ResourceType GetResourceType() const override; | 79 ResourceType GetResourceType() const override; |
82 int GetProcessType() const override; | 80 int GetProcessType() const override; |
83 blink::WebReferrerPolicy GetReferrerPolicy() const override; | 81 blink::WebReferrerPolicy GetReferrerPolicy() const override; |
84 blink::WebPageVisibilityState GetVisibilityState() const override; | 82 blink::WebPageVisibilityState GetVisibilityState() const override; |
85 ui::PageTransition GetPageTransition() const override; | 83 ui::PageTransition GetPageTransition() const override; |
86 bool HasUserGesture() const override; | 84 bool HasUserGesture() const override; |
87 bool WasIgnoredByHandler() const override; | 85 bool WasIgnoredByHandler() const override; |
88 bool GetAssociatedRenderFrame(int* render_process_id, | 86 bool GetAssociatedRenderFrame(int* render_process_id, |
89 int* render_frame_id) const override; | 87 int* render_frame_id) const override; |
90 bool IsAsync() const override; | 88 bool IsAsync() const override; |
(...skipping 16 matching lines...) Expand all Loading... |
107 } | 105 } |
108 | 106 |
109 // Updates the data associated with this request after it is is transferred | 107 // Updates the data associated with this request after it is is transferred |
110 // to a new renderer process. Not all data will change during a transfer. | 108 // to a new renderer process. Not all data will change during a transfer. |
111 // We do not expect the ResourceContext to change during navigation, so that | 109 // We do not expect the ResourceContext to change during navigation, so that |
112 // does not need to be updated. | 110 // does not need to be updated. |
113 void UpdateForTransfer(int child_id, | 111 void UpdateForTransfer(int child_id, |
114 int route_id, | 112 int route_id, |
115 int origin_pid, | 113 int origin_pid, |
116 int request_id, | 114 int request_id, |
117 int parent_render_frame_id, | |
118 base::WeakPtr<ResourceMessageFilter> filter); | 115 base::WeakPtr<ResourceMessageFilter> filter); |
119 | 116 |
120 // CrossSiteResourceHandler for this request. May be null. | 117 // CrossSiteResourceHandler for this request. May be null. |
121 CrossSiteResourceHandler* cross_site_handler() { | 118 CrossSiteResourceHandler* cross_site_handler() { |
122 return cross_site_handler_; | 119 return cross_site_handler_; |
123 } | 120 } |
124 void set_cross_site_handler(CrossSiteResourceHandler* h) { | 121 void set_cross_site_handler(CrossSiteResourceHandler* h) { |
125 cross_site_handler_ = h; | 122 cross_site_handler_ = h; |
126 } | 123 } |
127 | 124 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 189 |
193 int process_type_; | 190 int process_type_; |
194 int child_id_; | 191 int child_id_; |
195 int route_id_; | 192 int route_id_; |
196 const int frame_tree_node_id_; | 193 const int frame_tree_node_id_; |
197 int origin_pid_; | 194 int origin_pid_; |
198 int request_id_; | 195 int request_id_; |
199 int render_frame_id_; | 196 int render_frame_id_; |
200 bool is_main_frame_; | 197 bool is_main_frame_; |
201 bool parent_is_main_frame_; | 198 bool parent_is_main_frame_; |
202 int parent_render_frame_id_; | |
203 bool should_replace_current_entry_; | 199 bool should_replace_current_entry_; |
204 bool is_download_; | 200 bool is_download_; |
205 bool is_stream_; | 201 bool is_stream_; |
206 bool allow_download_; | 202 bool allow_download_; |
207 bool has_user_gesture_; | 203 bool has_user_gesture_; |
208 bool enable_load_timing_; | 204 bool enable_load_timing_; |
209 bool enable_upload_progress_; | 205 bool enable_upload_progress_; |
210 bool do_not_prompt_for_login_; | 206 bool do_not_prompt_for_login_; |
211 bool was_ignored_by_handler_; | 207 bool was_ignored_by_handler_; |
212 bool counted_as_in_flight_request_; | 208 bool counted_as_in_flight_request_; |
213 ResourceType resource_type_; | 209 ResourceType resource_type_; |
214 ui::PageTransition transition_type_; | 210 ui::PageTransition transition_type_; |
215 int memory_cost_; | 211 int memory_cost_; |
216 blink::WebReferrerPolicy referrer_policy_; | 212 blink::WebReferrerPolicy referrer_policy_; |
217 blink::WebPageVisibilityState visibility_state_; | 213 blink::WebPageVisibilityState visibility_state_; |
218 ResourceContext* context_; | 214 ResourceContext* context_; |
219 // The filter might be deleted without deleting this object if the process | 215 // The filter might be deleted without deleting this object if the process |
220 // exits during a transfer. | 216 // exits during a transfer. |
221 base::WeakPtr<ResourceMessageFilter> filter_; | 217 base::WeakPtr<ResourceMessageFilter> filter_; |
222 bool report_raw_headers_; | 218 bool report_raw_headers_; |
223 bool is_async_; | 219 bool is_async_; |
224 | 220 |
225 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); | 221 DISALLOW_COPY_AND_ASSIGN(ResourceRequestInfoImpl); |
226 }; | 222 }; |
227 | 223 |
228 } // namespace content | 224 } // namespace content |
229 | 225 |
230 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ | 226 #endif // CONTENT_BROWSER_LOADER_RESOURCE_REQUEST_INFO_IMPL_H_ |
OLD | NEW |