OLD | NEW |
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 #include "chrome/common/render_messages_params.h" | 5 #include "chrome/common/render_messages_params.h" |
6 | 6 |
7 #include "chrome/common/navigation_gesture.h" | 7 #include "chrome/common/navigation_gesture.h" |
8 #include "chrome/common/common_param_traits.h" | 8 #include "chrome/common/common_param_traits.h" |
9 #include "chrome/common/extensions/extension_constants.h" | 9 #include "chrome/common/extensions/extension_constants.h" |
10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 for_cross_site_transition(false), | 54 for_cross_site_transition(false), |
55 new_render_process_host_id(0), | 55 new_render_process_host_id(0), |
56 new_request_id(0) { | 56 new_request_id(0) { |
57 } | 57 } |
58 | 58 |
59 ViewMsg_ClosePage_Params::~ViewMsg_ClosePage_Params() { | 59 ViewMsg_ClosePage_Params::~ViewMsg_ClosePage_Params() { |
60 } | 60 } |
61 | 61 |
62 ViewHostMsg_Resource_Request::ViewHostMsg_Resource_Request() | 62 ViewHostMsg_Resource_Request::ViewHostMsg_Resource_Request() |
63 : load_flags(0), | 63 : load_flags(0), |
64 origin_child_id(0), | 64 origin_pid(0), |
65 resource_type(ResourceType::MAIN_FRAME), | 65 resource_type(ResourceType::MAIN_FRAME), |
66 request_context(0), | 66 request_context(0), |
67 appcache_host_id(0), | 67 appcache_host_id(0), |
68 download_to_file(false), | 68 download_to_file(false), |
69 has_user_gesture(false), | 69 has_user_gesture(false), |
70 host_renderer_id(0), | 70 host_renderer_id(0), |
71 host_render_view_id(0) { | 71 host_render_view_id(0) { |
72 } | 72 } |
73 | 73 |
74 ViewHostMsg_Resource_Request::~ViewHostMsg_Resource_Request() { | 74 ViewHostMsg_Resource_Request::~ViewHostMsg_Resource_Request() { |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 void ParamTraits<ViewHostMsg_Resource_Request>::Write(Message* m, | 917 void ParamTraits<ViewHostMsg_Resource_Request>::Write(Message* m, |
918 const param_type& p) { | 918 const param_type& p) { |
919 WriteParam(m, p.method); | 919 WriteParam(m, p.method); |
920 WriteParam(m, p.url); | 920 WriteParam(m, p.url); |
921 WriteParam(m, p.first_party_for_cookies); | 921 WriteParam(m, p.first_party_for_cookies); |
922 WriteParam(m, p.referrer); | 922 WriteParam(m, p.referrer); |
923 WriteParam(m, p.frame_origin); | 923 WriteParam(m, p.frame_origin); |
924 WriteParam(m, p.main_frame_origin); | 924 WriteParam(m, p.main_frame_origin); |
925 WriteParam(m, p.headers); | 925 WriteParam(m, p.headers); |
926 WriteParam(m, p.load_flags); | 926 WriteParam(m, p.load_flags); |
927 WriteParam(m, p.origin_child_id); | 927 WriteParam(m, p.origin_pid); |
928 WriteParam(m, p.resource_type); | 928 WriteParam(m, p.resource_type); |
929 WriteParam(m, p.request_context); | 929 WriteParam(m, p.request_context); |
930 WriteParam(m, p.appcache_host_id); | 930 WriteParam(m, p.appcache_host_id); |
931 WriteParam(m, p.upload_data); | 931 WriteParam(m, p.upload_data); |
932 WriteParam(m, p.download_to_file); | 932 WriteParam(m, p.download_to_file); |
933 WriteParam(m, p.has_user_gesture); | 933 WriteParam(m, p.has_user_gesture); |
934 WriteParam(m, p.host_renderer_id); | 934 WriteParam(m, p.host_renderer_id); |
935 WriteParam(m, p.host_render_view_id); | 935 WriteParam(m, p.host_render_view_id); |
936 } | 936 } |
937 | 937 |
938 bool ParamTraits<ViewHostMsg_Resource_Request>::Read(const Message* m, | 938 bool ParamTraits<ViewHostMsg_Resource_Request>::Read(const Message* m, |
939 void** iter, | 939 void** iter, |
940 param_type* r) { | 940 param_type* r) { |
941 return | 941 return |
942 ReadParam(m, iter, &r->method) && | 942 ReadParam(m, iter, &r->method) && |
943 ReadParam(m, iter, &r->url) && | 943 ReadParam(m, iter, &r->url) && |
944 ReadParam(m, iter, &r->first_party_for_cookies) && | 944 ReadParam(m, iter, &r->first_party_for_cookies) && |
945 ReadParam(m, iter, &r->referrer) && | 945 ReadParam(m, iter, &r->referrer) && |
946 ReadParam(m, iter, &r->frame_origin) && | 946 ReadParam(m, iter, &r->frame_origin) && |
947 ReadParam(m, iter, &r->main_frame_origin) && | 947 ReadParam(m, iter, &r->main_frame_origin) && |
948 ReadParam(m, iter, &r->headers) && | 948 ReadParam(m, iter, &r->headers) && |
949 ReadParam(m, iter, &r->load_flags) && | 949 ReadParam(m, iter, &r->load_flags) && |
950 ReadParam(m, iter, &r->origin_child_id) && | 950 ReadParam(m, iter, &r->origin_pid) && |
951 ReadParam(m, iter, &r->resource_type) && | 951 ReadParam(m, iter, &r->resource_type) && |
952 ReadParam(m, iter, &r->request_context) && | 952 ReadParam(m, iter, &r->request_context) && |
953 ReadParam(m, iter, &r->appcache_host_id) && | 953 ReadParam(m, iter, &r->appcache_host_id) && |
954 ReadParam(m, iter, &r->upload_data) && | 954 ReadParam(m, iter, &r->upload_data) && |
955 ReadParam(m, iter, &r->download_to_file) && | 955 ReadParam(m, iter, &r->download_to_file) && |
956 ReadParam(m, iter, &r->has_user_gesture) && | 956 ReadParam(m, iter, &r->has_user_gesture) && |
957 ReadParam(m, iter, &r->host_renderer_id) && | 957 ReadParam(m, iter, &r->host_renderer_id) && |
958 ReadParam(m, iter, &r->host_render_view_id); | 958 ReadParam(m, iter, &r->host_render_view_id); |
959 } | 959 } |
960 | 960 |
961 void ParamTraits<ViewHostMsg_Resource_Request>::Log(const param_type& p, | 961 void ParamTraits<ViewHostMsg_Resource_Request>::Log(const param_type& p, |
962 std::string* l) { | 962 std::string* l) { |
963 l->append("("); | 963 l->append("("); |
964 LogParam(p.method, l); | 964 LogParam(p.method, l); |
965 l->append(", "); | 965 l->append(", "); |
966 LogParam(p.url, l); | 966 LogParam(p.url, l); |
967 l->append(", "); | 967 l->append(", "); |
968 LogParam(p.referrer, l); | 968 LogParam(p.referrer, l); |
969 l->append(", "); | 969 l->append(", "); |
970 LogParam(p.frame_origin, l); | 970 LogParam(p.frame_origin, l); |
971 l->append(", "); | 971 l->append(", "); |
972 LogParam(p.main_frame_origin, l); | 972 LogParam(p.main_frame_origin, l); |
973 l->append(", "); | 973 l->append(", "); |
974 LogParam(p.load_flags, l); | 974 LogParam(p.load_flags, l); |
975 l->append(", "); | 975 l->append(", "); |
976 LogParam(p.origin_child_id, l); | 976 LogParam(p.origin_pid, l); |
977 l->append(", "); | 977 l->append(", "); |
978 LogParam(p.resource_type, l); | 978 LogParam(p.resource_type, l); |
979 l->append(", "); | 979 l->append(", "); |
980 LogParam(p.request_context, l); | 980 LogParam(p.request_context, l); |
981 l->append(", "); | 981 l->append(", "); |
982 LogParam(p.appcache_host_id, l); | 982 LogParam(p.appcache_host_id, l); |
983 l->append(", "); | 983 l->append(", "); |
984 LogParam(p.download_to_file, l); | 984 LogParam(p.download_to_file, l); |
985 l->append(", "); | 985 l->append(", "); |
986 LogParam(p.has_user_gesture, l); | 986 LogParam(p.has_user_gesture, l); |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1643 const param_type& p, | 1643 const param_type& p, |
1644 std::string* l) { | 1644 std::string* l) { |
1645 l->append("("); | 1645 l->append("("); |
1646 LogParam(p.notification_type, l); | 1646 LogParam(p.notification_type, l); |
1647 l->append(", "); | 1647 l->append(", "); |
1648 LogParam(p.acc_obj, l); | 1648 LogParam(p.acc_obj, l); |
1649 l->append(")"); | 1649 l->append(")"); |
1650 } | 1650 } |
1651 | 1651 |
1652 } // namespace IPC | 1652 } // namespace IPC |
OLD | NEW |