| 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/indexed_db_param_traits.h" | 9 #include "chrome/common/indexed_db_param_traits.h" |
| 10 #include "chrome/common/render_messages.h" | 10 #include "chrome/common/render_messages.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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_child_id(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 host_renderer_id(0), | 70 host_renderer_id(0), |
| 70 host_render_view_id(0) { | 71 host_render_view_id(0) { |
| 71 } | 72 } |
| 72 | 73 |
| 73 ViewHostMsg_Resource_Request::~ViewHostMsg_Resource_Request() { | 74 ViewHostMsg_Resource_Request::~ViewHostMsg_Resource_Request() { |
| 74 } | 75 } |
| 75 | 76 |
| 76 ViewMsg_Print_Params::ViewMsg_Print_Params() | 77 ViewMsg_Print_Params::ViewMsg_Print_Params() |
| 77 : margin_top(0), | 78 : margin_top(0), |
| 78 margin_left(0), | 79 margin_left(0), |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 WriteParam(m, p.frame_origin); | 932 WriteParam(m, p.frame_origin); |
| 932 WriteParam(m, p.main_frame_origin); | 933 WriteParam(m, p.main_frame_origin); |
| 933 WriteParam(m, p.headers); | 934 WriteParam(m, p.headers); |
| 934 WriteParam(m, p.load_flags); | 935 WriteParam(m, p.load_flags); |
| 935 WriteParam(m, p.origin_child_id); | 936 WriteParam(m, p.origin_child_id); |
| 936 WriteParam(m, p.resource_type); | 937 WriteParam(m, p.resource_type); |
| 937 WriteParam(m, p.request_context); | 938 WriteParam(m, p.request_context); |
| 938 WriteParam(m, p.appcache_host_id); | 939 WriteParam(m, p.appcache_host_id); |
| 939 WriteParam(m, p.upload_data); | 940 WriteParam(m, p.upload_data); |
| 940 WriteParam(m, p.download_to_file); | 941 WriteParam(m, p.download_to_file); |
| 942 WriteParam(m, p.has_user_gesture); |
| 941 WriteParam(m, p.host_renderer_id); | 943 WriteParam(m, p.host_renderer_id); |
| 942 WriteParam(m, p.host_render_view_id); | 944 WriteParam(m, p.host_render_view_id); |
| 943 } | 945 } |
| 944 | 946 |
| 945 bool ParamTraits<ViewHostMsg_Resource_Request>::Read(const Message* m, | 947 bool ParamTraits<ViewHostMsg_Resource_Request>::Read(const Message* m, |
| 946 void** iter, | 948 void** iter, |
| 947 param_type* r) { | 949 param_type* r) { |
| 948 return | 950 return |
| 949 ReadParam(m, iter, &r->method) && | 951 ReadParam(m, iter, &r->method) && |
| 950 ReadParam(m, iter, &r->url) && | 952 ReadParam(m, iter, &r->url) && |
| 951 ReadParam(m, iter, &r->first_party_for_cookies) && | 953 ReadParam(m, iter, &r->first_party_for_cookies) && |
| 952 ReadParam(m, iter, &r->referrer) && | 954 ReadParam(m, iter, &r->referrer) && |
| 953 ReadParam(m, iter, &r->frame_origin) && | 955 ReadParam(m, iter, &r->frame_origin) && |
| 954 ReadParam(m, iter, &r->main_frame_origin) && | 956 ReadParam(m, iter, &r->main_frame_origin) && |
| 955 ReadParam(m, iter, &r->headers) && | 957 ReadParam(m, iter, &r->headers) && |
| 956 ReadParam(m, iter, &r->load_flags) && | 958 ReadParam(m, iter, &r->load_flags) && |
| 957 ReadParam(m, iter, &r->origin_child_id) && | 959 ReadParam(m, iter, &r->origin_child_id) && |
| 958 ReadParam(m, iter, &r->resource_type) && | 960 ReadParam(m, iter, &r->resource_type) && |
| 959 ReadParam(m, iter, &r->request_context) && | 961 ReadParam(m, iter, &r->request_context) && |
| 960 ReadParam(m, iter, &r->appcache_host_id) && | 962 ReadParam(m, iter, &r->appcache_host_id) && |
| 961 ReadParam(m, iter, &r->upload_data) && | 963 ReadParam(m, iter, &r->upload_data) && |
| 962 ReadParam(m, iter, &r->download_to_file) && | 964 ReadParam(m, iter, &r->download_to_file) && |
| 965 ReadParam(m, iter, &r->has_user_gesture) && |
| 963 ReadParam(m, iter, &r->host_renderer_id) && | 966 ReadParam(m, iter, &r->host_renderer_id) && |
| 964 ReadParam(m, iter, &r->host_render_view_id); | 967 ReadParam(m, iter, &r->host_render_view_id); |
| 965 } | 968 } |
| 966 | 969 |
| 967 void ParamTraits<ViewHostMsg_Resource_Request>::Log(const param_type& p, | 970 void ParamTraits<ViewHostMsg_Resource_Request>::Log(const param_type& p, |
| 968 std::string* l) { | 971 std::string* l) { |
| 969 l->append("("); | 972 l->append("("); |
| 970 LogParam(p.method, l); | 973 LogParam(p.method, l); |
| 971 l->append(", "); | 974 l->append(", "); |
| 972 LogParam(p.url, l); | 975 LogParam(p.url, l); |
| 973 l->append(", "); | 976 l->append(", "); |
| 974 LogParam(p.referrer, l); | 977 LogParam(p.referrer, l); |
| 975 l->append(", "); | 978 l->append(", "); |
| 976 LogParam(p.frame_origin, l); | 979 LogParam(p.frame_origin, l); |
| 977 l->append(", "); | 980 l->append(", "); |
| 978 LogParam(p.main_frame_origin, l); | 981 LogParam(p.main_frame_origin, l); |
| 979 l->append(", "); | 982 l->append(", "); |
| 980 LogParam(p.load_flags, l); | 983 LogParam(p.load_flags, l); |
| 981 l->append(", "); | 984 l->append(", "); |
| 982 LogParam(p.origin_child_id, l); | 985 LogParam(p.origin_child_id, l); |
| 983 l->append(", "); | 986 l->append(", "); |
| 984 LogParam(p.resource_type, l); | 987 LogParam(p.resource_type, l); |
| 985 l->append(", "); | 988 l->append(", "); |
| 986 LogParam(p.request_context, l); | 989 LogParam(p.request_context, l); |
| 987 l->append(", "); | 990 l->append(", "); |
| 988 LogParam(p.appcache_host_id, l); | 991 LogParam(p.appcache_host_id, l); |
| 989 l->append(", "); | 992 l->append(", "); |
| 990 LogParam(p.download_to_file, l); | 993 LogParam(p.download_to_file, l); |
| 991 l->append(", "); | 994 l->append(", "); |
| 995 LogParam(p.has_user_gesture, l); |
| 996 l->append(", "); |
| 992 LogParam(p.host_renderer_id, l); | 997 LogParam(p.host_renderer_id, l); |
| 993 l->append(", "); | 998 l->append(", "); |
| 994 LogParam(p.host_render_view_id, l); | 999 LogParam(p.host_render_view_id, l); |
| 995 l->append(")"); | 1000 l->append(")"); |
| 996 } | 1001 } |
| 997 | 1002 |
| 998 void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) { | 1003 void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) { |
| 999 WriteParam(m, p.page_size); | 1004 WriteParam(m, p.page_size); |
| 1000 WriteParam(m, p.printable_size); | 1005 WriteParam(m, p.printable_size); |
| 1001 WriteParam(m, p.margin_top); | 1006 WriteParam(m, p.margin_top); |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1928 const param_type& p, | 1933 const param_type& p, |
| 1929 std::string* l) { | 1934 std::string* l) { |
| 1930 l->append("("); | 1935 l->append("("); |
| 1931 LogParam(p.notification_type, l); | 1936 LogParam(p.notification_type, l); |
| 1932 l->append(", "); | 1937 l->append(", "); |
| 1933 LogParam(p.acc_obj, l); | 1938 LogParam(p.acc_obj, l); |
| 1934 l->append(")"); | 1939 l->append(")"); |
| 1935 } | 1940 } |
| 1936 | 1941 |
| 1937 } // namespace IPC | 1942 } // namespace IPC |
| OLD | NEW |