Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: chrome/common/render_messages.h

Issue 3053009: Pepper stream-to-file plumbing.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 // Used by plugin->browser requests to get the correct URLRequestContext. 401 // Used by plugin->browser requests to get the correct URLRequestContext.
402 uint32 request_context; 402 uint32 request_context;
403 403
404 // Indicates which frame (or worker context) the request is being loaded into, 404 // Indicates which frame (or worker context) the request is being loaded into,
405 // or kNoHostId. 405 // or kNoHostId.
406 int appcache_host_id; 406 int appcache_host_id;
407 407
408 // Optional upload data (may be null). 408 // Optional upload data (may be null).
409 scoped_refptr<net::UploadData> upload_data; 409 scoped_refptr<net::UploadData> upload_data;
410 410
411 bool download_to_file;
412
411 // The following two members are specified if the request is initiated by 413 // The following two members are specified if the request is initiated by
412 // a plugin like Gears. 414 // a plugin like Gears.
413 415
414 // Contains the id of the host renderer. 416 // Contains the id of the host renderer.
415 int host_renderer_id; 417 int host_renderer_id;
416 418
417 // Contains the id of the host render view. 419 // Contains the id of the host render view.
418 int host_render_view_id; 420 int host_render_view_id;
419 }; 421 };
420 422
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 WriteParam(m, p.referrer); 1423 WriteParam(m, p.referrer);
1422 WriteParam(m, p.frame_origin); 1424 WriteParam(m, p.frame_origin);
1423 WriteParam(m, p.main_frame_origin); 1425 WriteParam(m, p.main_frame_origin);
1424 WriteParam(m, p.headers); 1426 WriteParam(m, p.headers);
1425 WriteParam(m, p.load_flags); 1427 WriteParam(m, p.load_flags);
1426 WriteParam(m, p.origin_child_id); 1428 WriteParam(m, p.origin_child_id);
1427 WriteParam(m, p.resource_type); 1429 WriteParam(m, p.resource_type);
1428 WriteParam(m, p.request_context); 1430 WriteParam(m, p.request_context);
1429 WriteParam(m, p.appcache_host_id); 1431 WriteParam(m, p.appcache_host_id);
1430 WriteParam(m, p.upload_data); 1432 WriteParam(m, p.upload_data);
1433 WriteParam(m, p.download_to_file);
1431 WriteParam(m, p.host_renderer_id); 1434 WriteParam(m, p.host_renderer_id);
1432 WriteParam(m, p.host_render_view_id); 1435 WriteParam(m, p.host_render_view_id);
1433 } 1436 }
1434 static bool Read(const Message* m, void** iter, param_type* r) { 1437 static bool Read(const Message* m, void** iter, param_type* r) {
1435 return 1438 return
1436 ReadParam(m, iter, &r->method) && 1439 ReadParam(m, iter, &r->method) &&
1437 ReadParam(m, iter, &r->url) && 1440 ReadParam(m, iter, &r->url) &&
1438 ReadParam(m, iter, &r->first_party_for_cookies) && 1441 ReadParam(m, iter, &r->first_party_for_cookies) &&
1439 ReadParam(m, iter, &r->referrer) && 1442 ReadParam(m, iter, &r->referrer) &&
1440 ReadParam(m, iter, &r->frame_origin) && 1443 ReadParam(m, iter, &r->frame_origin) &&
1441 ReadParam(m, iter, &r->main_frame_origin) && 1444 ReadParam(m, iter, &r->main_frame_origin) &&
1442 ReadParam(m, iter, &r->headers) && 1445 ReadParam(m, iter, &r->headers) &&
1443 ReadParam(m, iter, &r->load_flags) && 1446 ReadParam(m, iter, &r->load_flags) &&
1444 ReadParam(m, iter, &r->origin_child_id) && 1447 ReadParam(m, iter, &r->origin_child_id) &&
1445 ReadParam(m, iter, &r->resource_type) && 1448 ReadParam(m, iter, &r->resource_type) &&
1446 ReadParam(m, iter, &r->request_context) && 1449 ReadParam(m, iter, &r->request_context) &&
1447 ReadParam(m, iter, &r->appcache_host_id) && 1450 ReadParam(m, iter, &r->appcache_host_id) &&
1448 ReadParam(m, iter, &r->upload_data) && 1451 ReadParam(m, iter, &r->upload_data) &&
1452 ReadParam(m, iter, &r->download_to_file) &&
1449 ReadParam(m, iter, &r->host_renderer_id) && 1453 ReadParam(m, iter, &r->host_renderer_id) &&
1450 ReadParam(m, iter, &r->host_render_view_id); 1454 ReadParam(m, iter, &r->host_render_view_id);
1451 } 1455 }
1452 static void Log(const param_type& p, std::wstring* l) { 1456 static void Log(const param_type& p, std::wstring* l) {
1453 l->append(L"("); 1457 l->append(L"(");
1454 LogParam(p.method, l); 1458 LogParam(p.method, l);
1455 l->append(L", "); 1459 l->append(L", ");
1456 LogParam(p.url, l); 1460 LogParam(p.url, l);
1457 l->append(L", "); 1461 l->append(L", ");
1458 LogParam(p.referrer, l); 1462 LogParam(p.referrer, l);
1459 l->append(L", "); 1463 l->append(L", ");
1460 LogParam(p.frame_origin, l); 1464 LogParam(p.frame_origin, l);
1461 l->append(L", "); 1465 l->append(L", ");
1462 LogParam(p.main_frame_origin, l); 1466 LogParam(p.main_frame_origin, l);
1463 l->append(L", "); 1467 l->append(L", ");
1464 LogParam(p.load_flags, l); 1468 LogParam(p.load_flags, l);
1465 l->append(L", "); 1469 l->append(L", ");
1466 LogParam(p.origin_child_id, l); 1470 LogParam(p.origin_child_id, l);
1467 l->append(L", "); 1471 l->append(L", ");
1468 LogParam(p.resource_type, l); 1472 LogParam(p.resource_type, l);
1469 l->append(L", "); 1473 l->append(L", ");
1470 LogParam(p.request_context, l); 1474 LogParam(p.request_context, l);
1471 l->append(L", "); 1475 l->append(L", ");
1472 LogParam(p.appcache_host_id, l); 1476 LogParam(p.appcache_host_id, l);
1473 l->append(L", "); 1477 l->append(L", ");
1478 LogParam(p.download_to_file, l);
1479 l->append(L", ");
1474 LogParam(p.host_renderer_id, l); 1480 LogParam(p.host_renderer_id, l);
1475 l->append(L", "); 1481 l->append(L", ");
1476 LogParam(p.host_render_view_id, l); 1482 LogParam(p.host_render_view_id, l);
1477 l->append(L")"); 1483 l->append(L")");
1478 } 1484 }
1479 }; 1485 };
1480 1486
1481 template <> 1487 template <>
1482 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { 1488 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > {
1483 typedef scoped_refptr<net::HttpResponseHeaders> param_type; 1489 typedef scoped_refptr<net::HttpResponseHeaders> param_type;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 WriteParam(m, p.headers); 1592 WriteParam(m, p.headers);
1587 WriteParam(m, p.mime_type); 1593 WriteParam(m, p.mime_type);
1588 WriteParam(m, p.charset); 1594 WriteParam(m, p.charset);
1589 WriteParam(m, p.security_info); 1595 WriteParam(m, p.security_info);
1590 WriteParam(m, p.content_length); 1596 WriteParam(m, p.content_length);
1591 WriteParam(m, p.appcache_id); 1597 WriteParam(m, p.appcache_id);
1592 WriteParam(m, p.appcache_manifest_url); 1598 WriteParam(m, p.appcache_manifest_url);
1593 WriteParam(m, p.connection_id); 1599 WriteParam(m, p.connection_id);
1594 WriteParam(m, p.connection_reused); 1600 WriteParam(m, p.connection_reused);
1595 WriteParam(m, p.load_timing); 1601 WriteParam(m, p.load_timing);
1602 WriteParam(m, p.download_file_path);
1596 WriteParam(m, p.was_fetched_via_spdy); 1603 WriteParam(m, p.was_fetched_via_spdy);
1597 WriteParam(m, p.was_npn_negotiated); 1604 WriteParam(m, p.was_npn_negotiated);
1598 WriteParam(m, p.was_alternate_protocol_available); 1605 WriteParam(m, p.was_alternate_protocol_available);
1599 WriteParam(m, p.was_fetched_via_proxy); 1606 WriteParam(m, p.was_fetched_via_proxy);
1600 } 1607 }
1601 static bool Read(const Message* m, void** iter, param_type* r) { 1608 static bool Read(const Message* m, void** iter, param_type* r) {
1602 return 1609 return
1603 ReadParam(m, iter, &r->request_time) && 1610 ReadParam(m, iter, &r->request_time) &&
1604 ReadParam(m, iter, &r->response_time) && 1611 ReadParam(m, iter, &r->response_time) &&
1605 ReadParam(m, iter, &r->headers) && 1612 ReadParam(m, iter, &r->headers) &&
1606 ReadParam(m, iter, &r->mime_type) && 1613 ReadParam(m, iter, &r->mime_type) &&
1607 ReadParam(m, iter, &r->charset) && 1614 ReadParam(m, iter, &r->charset) &&
1608 ReadParam(m, iter, &r->security_info) && 1615 ReadParam(m, iter, &r->security_info) &&
1609 ReadParam(m, iter, &r->content_length) && 1616 ReadParam(m, iter, &r->content_length) &&
1610 ReadParam(m, iter, &r->appcache_id) && 1617 ReadParam(m, iter, &r->appcache_id) &&
1611 ReadParam(m, iter, &r->appcache_manifest_url) && 1618 ReadParam(m, iter, &r->appcache_manifest_url) &&
1612 ReadParam(m, iter, &r->connection_id) && 1619 ReadParam(m, iter, &r->connection_id) &&
1613 ReadParam(m, iter, &r->connection_reused) && 1620 ReadParam(m, iter, &r->connection_reused) &&
1614 ReadParam(m, iter, &r->load_timing) && 1621 ReadParam(m, iter, &r->load_timing) &&
1622 ReadParam(m, iter, &r->download_file_path) &&
1615 ReadParam(m, iter, &r->was_fetched_via_spdy) && 1623 ReadParam(m, iter, &r->was_fetched_via_spdy) &&
1616 ReadParam(m, iter, &r->was_npn_negotiated) && 1624 ReadParam(m, iter, &r->was_npn_negotiated) &&
1617 ReadParam(m, iter, &r->was_alternate_protocol_available) && 1625 ReadParam(m, iter, &r->was_alternate_protocol_available) &&
1618 ReadParam(m, iter, &r->was_fetched_via_proxy); 1626 ReadParam(m, iter, &r->was_fetched_via_proxy);
1619 } 1627 }
1620 static void Log(const param_type& p, std::wstring* l) { 1628 static void Log(const param_type& p, std::wstring* l) {
1621 l->append(L"("); 1629 l->append(L"(");
1622 LogParam(p.request_time, l); 1630 LogParam(p.request_time, l);
1623 l->append(L", "); 1631 l->append(L", ");
1624 LogParam(p.response_time, l); 1632 LogParam(p.response_time, l);
(...skipping 11 matching lines...) Expand all
1636 LogParam(p.appcache_id, l); 1644 LogParam(p.appcache_id, l);
1637 l->append(L", "); 1645 l->append(L", ");
1638 LogParam(p.appcache_manifest_url, l); 1646 LogParam(p.appcache_manifest_url, l);
1639 l->append(L", "); 1647 l->append(L", ");
1640 LogParam(p.connection_id, l); 1648 LogParam(p.connection_id, l);
1641 l->append(L", "); 1649 l->append(L", ");
1642 LogParam(p.connection_reused, l); 1650 LogParam(p.connection_reused, l);
1643 l->append(L", "); 1651 l->append(L", ");
1644 LogParam(p.load_timing, l); 1652 LogParam(p.load_timing, l);
1645 l->append(L", "); 1653 l->append(L", ");
1654 LogParam(p.download_file_path, l);
1655 l->append(L", ");
1646 LogParam(p.was_fetched_via_spdy, l); 1656 LogParam(p.was_fetched_via_spdy, l);
1647 l->append(L", "); 1657 l->append(L", ");
1648 LogParam(p.was_npn_negotiated, l); 1658 LogParam(p.was_npn_negotiated, l);
1649 l->append(L", "); 1659 l->append(L", ");
1650 LogParam(p.was_alternate_protocol_available, l); 1660 LogParam(p.was_alternate_protocol_available, l);
1651 l->append(L", "); 1661 l->append(L", ");
1652 LogParam(p.was_fetched_via_proxy, l); 1662 LogParam(p.was_fetched_via_proxy, l);
1653 l->append(L")"); 1663 l->append(L")");
1654 } 1664 }
1655 }; 1665 };
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
3201 l->append(L")"); 3211 l->append(L")");
3202 } 3212 }
3203 }; 3213 };
3204 3214
3205 } // namespace IPC 3215 } // namespace IPC
3206 3216
3207 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" 3217 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
3208 #include "ipc/ipc_message_macros.h" 3218 #include "ipc/ipc_message_macros.h"
3209 3219
3210 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 3220 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_localization_peer_unittest.cc ('k') | chrome/common/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698