| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 // to update our mixed content state. | 246 // to update our mixed content state. |
| 247 std::string frame_origin; | 247 std::string frame_origin; |
| 248 | 248 |
| 249 // The origin of the main frame (top-level frame) that is associated with this | 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. | 250 // request. This is used to update our mixed content state. |
| 251 std::string main_frame_origin; | 251 std::string main_frame_origin; |
| 252 | 252 |
| 253 // Additional HTTP request headers. | 253 // Additional HTTP request headers. |
| 254 std::string headers; | 254 std::string headers; |
| 255 | 255 |
| 256 // The default MIME type to use if the response lacks a Content-Type header. |
| 257 // Use the empty string here if you don't want special MIME type handling. |
| 258 std::string default_mime_type; |
| 259 |
| 256 // URLRequest load flags (0 by default). | 260 // URLRequest load flags (0 by default). |
| 257 int load_flags; | 261 int load_flags; |
| 258 | 262 |
| 259 // Process ID of process that originated this request. | 263 // Process ID of process that originated this request. |
| 260 int origin_pid; | 264 int origin_pid; |
| 261 | 265 |
| 262 // What this resource load is for (main frame, sub-frame, sub-resource, | 266 // What this resource load is for (main frame, sub-frame, sub-resource, |
| 263 // object). | 267 // object). |
| 264 ResourceType::Type resource_type; | 268 ResourceType::Type resource_type; |
| 265 | 269 |
| (...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 struct ParamTraits<ViewHostMsg_Resource_Request> { | 1330 struct ParamTraits<ViewHostMsg_Resource_Request> { |
| 1327 typedef ViewHostMsg_Resource_Request param_type; | 1331 typedef ViewHostMsg_Resource_Request param_type; |
| 1328 static void Write(Message* m, const param_type& p) { | 1332 static void Write(Message* m, const param_type& p) { |
| 1329 WriteParam(m, p.method); | 1333 WriteParam(m, p.method); |
| 1330 WriteParam(m, p.url); | 1334 WriteParam(m, p.url); |
| 1331 WriteParam(m, p.policy_url); | 1335 WriteParam(m, p.policy_url); |
| 1332 WriteParam(m, p.referrer); | 1336 WriteParam(m, p.referrer); |
| 1333 WriteParam(m, p.frame_origin); | 1337 WriteParam(m, p.frame_origin); |
| 1334 WriteParam(m, p.main_frame_origin); | 1338 WriteParam(m, p.main_frame_origin); |
| 1335 WriteParam(m, p.headers); | 1339 WriteParam(m, p.headers); |
| 1340 WriteParam(m, p.default_mime_type); |
| 1336 WriteParam(m, p.load_flags); | 1341 WriteParam(m, p.load_flags); |
| 1337 WriteParam(m, p.origin_pid); | 1342 WriteParam(m, p.origin_pid); |
| 1338 WriteParam(m, p.resource_type); | 1343 WriteParam(m, p.resource_type); |
| 1339 WriteParam(m, p.request_context); | 1344 WriteParam(m, p.request_context); |
| 1340 WriteParam(m, p.upload_data); | 1345 WriteParam(m, p.upload_data); |
| 1341 } | 1346 } |
| 1342 static bool Read(const Message* m, void** iter, param_type* r) { | 1347 static bool Read(const Message* m, void** iter, param_type* r) { |
| 1343 return | 1348 return |
| 1344 ReadParam(m, iter, &r->method) && | 1349 ReadParam(m, iter, &r->method) && |
| 1345 ReadParam(m, iter, &r->url) && | 1350 ReadParam(m, iter, &r->url) && |
| 1346 ReadParam(m, iter, &r->policy_url) && | 1351 ReadParam(m, iter, &r->policy_url) && |
| 1347 ReadParam(m, iter, &r->referrer) && | 1352 ReadParam(m, iter, &r->referrer) && |
| 1348 ReadParam(m, iter, &r->frame_origin) && | 1353 ReadParam(m, iter, &r->frame_origin) && |
| 1349 ReadParam(m, iter, &r->main_frame_origin) && | 1354 ReadParam(m, iter, &r->main_frame_origin) && |
| 1350 ReadParam(m, iter, &r->headers) && | 1355 ReadParam(m, iter, &r->headers) && |
| 1356 ReadParam(m, iter, &r->default_mime_type) && |
| 1351 ReadParam(m, iter, &r->load_flags) && | 1357 ReadParam(m, iter, &r->load_flags) && |
| 1352 ReadParam(m, iter, &r->origin_pid) && | 1358 ReadParam(m, iter, &r->origin_pid) && |
| 1353 ReadParam(m, iter, &r->resource_type) && | 1359 ReadParam(m, iter, &r->resource_type) && |
| 1354 ReadParam(m, iter, &r->request_context) && | 1360 ReadParam(m, iter, &r->request_context) && |
| 1355 ReadParam(m, iter, &r->upload_data); | 1361 ReadParam(m, iter, &r->upload_data); |
| 1356 } | 1362 } |
| 1357 static void Log(const param_type& p, std::wstring* l) { | 1363 static void Log(const param_type& p, std::wstring* l) { |
| 1358 l->append(L"("); | 1364 l->append(L"("); |
| 1359 LogParam(p.method, l); | 1365 LogParam(p.method, l); |
| 1360 l->append(L", "); | 1366 l->append(L", "); |
| 1361 LogParam(p.url, l); | 1367 LogParam(p.url, l); |
| 1362 l->append(L", "); | 1368 l->append(L", "); |
| 1363 LogParam(p.referrer, l); | 1369 LogParam(p.referrer, l); |
| 1364 l->append(L", "); | 1370 l->append(L", "); |
| 1365 LogParam(p.frame_origin, l); | 1371 LogParam(p.frame_origin, l); |
| 1366 l->append(L", "); | 1372 l->append(L", "); |
| 1367 LogParam(p.main_frame_origin, l); | 1373 LogParam(p.main_frame_origin, l); |
| 1368 l->append(L", "); | 1374 l->append(L", "); |
| 1375 LogParam(p.default_mime_type, l); |
| 1376 l->append(L", "); |
| 1369 LogParam(p.load_flags, l); | 1377 LogParam(p.load_flags, l); |
| 1370 l->append(L", "); | 1378 l->append(L", "); |
| 1371 LogParam(p.origin_pid, l); | 1379 LogParam(p.origin_pid, l); |
| 1372 l->append(L", "); | 1380 l->append(L", "); |
| 1373 LogParam(p.resource_type, l); | 1381 LogParam(p.resource_type, l); |
| 1374 l->append(L", "); | 1382 l->append(L", "); |
| 1375 LogParam(p.request_context, l); | 1383 LogParam(p.request_context, l); |
| 1376 l->append(L")"); | 1384 l->append(L")"); |
| 1377 } | 1385 } |
| 1378 }; | 1386 }; |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1915 } | 1923 } |
| 1916 }; | 1924 }; |
| 1917 | 1925 |
| 1918 } // namespace IPC | 1926 } // namespace IPC |
| 1919 | 1927 |
| 1920 | 1928 |
| 1921 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 1929 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
| 1922 #include "chrome/common/ipc_message_macros.h" | 1930 #include "chrome/common/ipc_message_macros.h" |
| 1923 | 1931 |
| 1924 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 1932 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| OLD | NEW |