| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_COMMON_RENDER_MESSAGES_H_ | 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
| 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ | 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // The URL of the document in the top-level window, which may be checked by | 235 // The URL of the document in the top-level window, which may be checked by |
| 236 // the third-party cookie blocking policy. Leaving it empty may lead to | 236 // the third-party cookie blocking policy. Leaving it empty may lead to |
| 237 // undesired cookie blocking. Third-party cookie blocking can be bypassed by | 237 // undesired cookie blocking. Third-party cookie blocking can be bypassed by |
| 238 // setting policy_url = url, but this should ideally only be done if there | 238 // setting policy_url = url, but this should ideally only be done if there |
| 239 // really is no way to determine the correct value. | 239 // really is no way to determine the correct value. |
| 240 GURL policy_url; | 240 GURL policy_url; |
| 241 | 241 |
| 242 // The referrer to use (may be empty). | 242 // The referrer to use (may be empty). |
| 243 GURL referrer; | 243 GURL referrer; |
| 244 | 244 |
| 245 // The origin of the frame that is associated with this request. This is used |
| 246 // to update our mixed content state. |
| 247 std::string frame_origin; |
| 248 |
| 249 // The origin of the main frame (top-level frame) that is associated with this |
| 250 // request. This is used to update our mixed content state. |
| 251 std::string main_frame_origin; |
| 252 |
| 245 // Additional HTTP request headers. | 253 // Additional HTTP request headers. |
| 246 std::string headers; | 254 std::string headers; |
| 247 | 255 |
| 248 // URLRequest load flags (0 by default). | 256 // URLRequest load flags (0 by default). |
| 249 int load_flags; | 257 int load_flags; |
| 250 | 258 |
| 251 // Process ID of process that originated this request. | 259 // Process ID of process that originated this request. |
| 252 int origin_pid; | 260 int origin_pid; |
| 253 | 261 |
| 254 // What this resource load is for (main frame, sub-frame, sub-resource, | 262 // What this resource load is for (main frame, sub-frame, sub-resource, |
| 255 // object). | 263 // object). |
| 256 ResourceType::Type resource_type; | 264 ResourceType::Type resource_type; |
| 257 | 265 |
| 258 // True if this request is for a resource loaded over HTTP when the main page | |
| 259 // was loaded over HTTPS. | |
| 260 bool mixed_content; | |
| 261 | |
| 262 // Used by plugin->browser requests to get the correct URLRequestContext. | 266 // Used by plugin->browser requests to get the correct URLRequestContext. |
| 263 uint32 request_context; | 267 uint32 request_context; |
| 264 | 268 |
| 265 // Optional upload data (may be empty). | 269 // Optional upload data (may be empty). |
| 266 std::vector<net::UploadData::Element> upload_content; | 270 std::vector<net::UploadData::Element> upload_content; |
| 267 }; | 271 }; |
| 268 | 272 |
| 269 // Parameters for a render request. | 273 // Parameters for a render request. |
| 270 struct ViewMsg_Print_Params { | 274 struct ViewMsg_Print_Params { |
| 271 // In pixels according to dpi_x and dpi_y. | 275 // In pixels according to dpi_x and dpi_y. |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 | 1241 |
| 1238 // Traits for ViewHostMsg_Resource_Request | 1242 // Traits for ViewHostMsg_Resource_Request |
| 1239 template <> | 1243 template <> |
| 1240 struct ParamTraits<ViewHostMsg_Resource_Request> { | 1244 struct ParamTraits<ViewHostMsg_Resource_Request> { |
| 1241 typedef ViewHostMsg_Resource_Request param_type; | 1245 typedef ViewHostMsg_Resource_Request param_type; |
| 1242 static void Write(Message* m, const param_type& p) { | 1246 static void Write(Message* m, const param_type& p) { |
| 1243 WriteParam(m, p.method); | 1247 WriteParam(m, p.method); |
| 1244 WriteParam(m, p.url); | 1248 WriteParam(m, p.url); |
| 1245 WriteParam(m, p.policy_url); | 1249 WriteParam(m, p.policy_url); |
| 1246 WriteParam(m, p.referrer); | 1250 WriteParam(m, p.referrer); |
| 1251 WriteParam(m, p.frame_origin); |
| 1252 WriteParam(m, p.main_frame_origin); |
| 1247 WriteParam(m, p.headers); | 1253 WriteParam(m, p.headers); |
| 1248 WriteParam(m, p.load_flags); | 1254 WriteParam(m, p.load_flags); |
| 1249 WriteParam(m, p.origin_pid); | 1255 WriteParam(m, p.origin_pid); |
| 1250 WriteParam(m, p.resource_type); | 1256 WriteParam(m, p.resource_type); |
| 1251 WriteParam(m, p.mixed_content); | |
| 1252 WriteParam(m, p.request_context); | 1257 WriteParam(m, p.request_context); |
| 1253 WriteParam(m, p.upload_content); | 1258 WriteParam(m, p.upload_content); |
| 1254 } | 1259 } |
| 1255 static bool Read(const Message* m, void** iter, param_type* r) { | 1260 static bool Read(const Message* m, void** iter, param_type* r) { |
| 1256 return | 1261 return |
| 1257 ReadParam(m, iter, &r->method) && | 1262 ReadParam(m, iter, &r->method) && |
| 1258 ReadParam(m, iter, &r->url) && | 1263 ReadParam(m, iter, &r->url) && |
| 1259 ReadParam(m, iter, &r->policy_url) && | 1264 ReadParam(m, iter, &r->policy_url) && |
| 1260 ReadParam(m, iter, &r->referrer) && | 1265 ReadParam(m, iter, &r->referrer) && |
| 1266 ReadParam(m, iter, &r->frame_origin) && |
| 1267 ReadParam(m, iter, &r->main_frame_origin) && |
| 1261 ReadParam(m, iter, &r->headers) && | 1268 ReadParam(m, iter, &r->headers) && |
| 1262 ReadParam(m, iter, &r->load_flags) && | 1269 ReadParam(m, iter, &r->load_flags) && |
| 1263 ReadParam(m, iter, &r->origin_pid) && | 1270 ReadParam(m, iter, &r->origin_pid) && |
| 1264 ReadParam(m, iter, &r->resource_type) && | 1271 ReadParam(m, iter, &r->resource_type) && |
| 1265 ReadParam(m, iter, &r->mixed_content) && | |
| 1266 ReadParam(m, iter, &r->request_context) && | 1272 ReadParam(m, iter, &r->request_context) && |
| 1267 ReadParam(m, iter, &r->upload_content); | 1273 ReadParam(m, iter, &r->upload_content); |
| 1268 } | 1274 } |
| 1269 static void Log(const param_type& p, std::wstring* l) { | 1275 static void Log(const param_type& p, std::wstring* l) { |
| 1270 l->append(L"("); | 1276 l->append(L"("); |
| 1271 LogParam(p.method, l); | 1277 LogParam(p.method, l); |
| 1272 l->append(L", "); | 1278 l->append(L", "); |
| 1273 LogParam(p.url, l); | 1279 LogParam(p.url, l); |
| 1274 l->append(L", "); | 1280 l->append(L", "); |
| 1275 LogParam(p.referrer, l); | 1281 LogParam(p.referrer, l); |
| 1276 l->append(L", "); | 1282 l->append(L", "); |
| 1283 LogParam(p.frame_origin, l); |
| 1284 l->append(L", "); |
| 1285 LogParam(p.main_frame_origin, l); |
| 1286 l->append(L", "); |
| 1277 LogParam(p.load_flags, l); | 1287 LogParam(p.load_flags, l); |
| 1278 l->append(L", "); | 1288 l->append(L", "); |
| 1279 LogParam(p.origin_pid, l); | 1289 LogParam(p.origin_pid, l); |
| 1280 l->append(L", "); | 1290 l->append(L", "); |
| 1281 LogParam(p.resource_type, l); | 1291 LogParam(p.resource_type, l); |
| 1282 l->append(L", "); | 1292 l->append(L", "); |
| 1283 LogParam(p.mixed_content, l); | |
| 1284 l->append(L", "); | |
| 1285 LogParam(p.request_context, l); | 1293 LogParam(p.request_context, l); |
| 1286 l->append(L")"); | 1294 l->append(L")"); |
| 1287 } | 1295 } |
| 1288 }; | 1296 }; |
| 1289 | 1297 |
| 1290 // Traits for URLRequestStatus | 1298 // Traits for URLRequestStatus |
| 1291 template <> | 1299 template <> |
| 1292 struct ParamTraits<URLRequestStatus> { | 1300 struct ParamTraits<URLRequestStatus> { |
| 1293 typedef URLRequestStatus param_type; | 1301 typedef URLRequestStatus param_type; |
| 1294 static void Write(Message* m, const param_type& p) { | 1302 static void Write(Message* m, const param_type& p) { |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1826 }; | 1834 }; |
| 1827 | 1835 |
| 1828 | 1836 |
| 1829 } // namespace IPC | 1837 } // namespace IPC |
| 1830 | 1838 |
| 1831 | 1839 |
| 1832 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 1840 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
| 1833 #include "chrome/common/ipc_message_macros.h" | 1841 #include "chrome/common/ipc_message_macros.h" |
| 1834 | 1842 |
| 1835 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 1843 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| OLD | NEW |