| 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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 WriteParam(m, p.frame_origin); | 926 WriteParam(m, p.frame_origin); |
| 926 WriteParam(m, p.main_frame_origin); | 927 WriteParam(m, p.main_frame_origin); |
| 927 WriteParam(m, p.headers); | 928 WriteParam(m, p.headers); |
| 928 WriteParam(m, p.load_flags); | 929 WriteParam(m, p.load_flags); |
| 929 WriteParam(m, p.origin_child_id); | 930 WriteParam(m, p.origin_child_id); |
| 930 WriteParam(m, p.resource_type); | 931 WriteParam(m, p.resource_type); |
| 931 WriteParam(m, p.request_context); | 932 WriteParam(m, p.request_context); |
| 932 WriteParam(m, p.appcache_host_id); | 933 WriteParam(m, p.appcache_host_id); |
| 933 WriteParam(m, p.upload_data); | 934 WriteParam(m, p.upload_data); |
| 934 WriteParam(m, p.download_to_file); | 935 WriteParam(m, p.download_to_file); |
| 936 WriteParam(m, p.has_user_gesture); |
| 935 WriteParam(m, p.host_renderer_id); | 937 WriteParam(m, p.host_renderer_id); |
| 936 WriteParam(m, p.host_render_view_id); | 938 WriteParam(m, p.host_render_view_id); |
| 937 } | 939 } |
| 938 | 940 |
| 939 bool ParamTraits<ViewHostMsg_Resource_Request>::Read(const Message* m, | 941 bool ParamTraits<ViewHostMsg_Resource_Request>::Read(const Message* m, |
| 940 void** iter, | 942 void** iter, |
| 941 param_type* r) { | 943 param_type* r) { |
| 942 return | 944 return |
| 943 ReadParam(m, iter, &r->method) && | 945 ReadParam(m, iter, &r->method) && |
| 944 ReadParam(m, iter, &r->url) && | 946 ReadParam(m, iter, &r->url) && |
| 945 ReadParam(m, iter, &r->first_party_for_cookies) && | 947 ReadParam(m, iter, &r->first_party_for_cookies) && |
| 946 ReadParam(m, iter, &r->referrer) && | 948 ReadParam(m, iter, &r->referrer) && |
| 947 ReadParam(m, iter, &r->frame_origin) && | 949 ReadParam(m, iter, &r->frame_origin) && |
| 948 ReadParam(m, iter, &r->main_frame_origin) && | 950 ReadParam(m, iter, &r->main_frame_origin) && |
| 949 ReadParam(m, iter, &r->headers) && | 951 ReadParam(m, iter, &r->headers) && |
| 950 ReadParam(m, iter, &r->load_flags) && | 952 ReadParam(m, iter, &r->load_flags) && |
| 951 ReadParam(m, iter, &r->origin_child_id) && | 953 ReadParam(m, iter, &r->origin_child_id) && |
| 952 ReadParam(m, iter, &r->resource_type) && | 954 ReadParam(m, iter, &r->resource_type) && |
| 953 ReadParam(m, iter, &r->request_context) && | 955 ReadParam(m, iter, &r->request_context) && |
| 954 ReadParam(m, iter, &r->appcache_host_id) && | 956 ReadParam(m, iter, &r->appcache_host_id) && |
| 955 ReadParam(m, iter, &r->upload_data) && | 957 ReadParam(m, iter, &r->upload_data) && |
| 956 ReadParam(m, iter, &r->download_to_file) && | 958 ReadParam(m, iter, &r->download_to_file) && |
| 959 ReadParam(m, iter, &r->has_user_gesture) && |
| 957 ReadParam(m, iter, &r->host_renderer_id) && | 960 ReadParam(m, iter, &r->host_renderer_id) && |
| 958 ReadParam(m, iter, &r->host_render_view_id); | 961 ReadParam(m, iter, &r->host_render_view_id); |
| 959 } | 962 } |
| 960 | 963 |
| 961 void ParamTraits<ViewHostMsg_Resource_Request>::Log(const param_type& p, | 964 void ParamTraits<ViewHostMsg_Resource_Request>::Log(const param_type& p, |
| 962 std::string* l) { | 965 std::string* l) { |
| 963 l->append("("); | 966 l->append("("); |
| 964 LogParam(p.method, l); | 967 LogParam(p.method, l); |
| 965 l->append(", "); | 968 l->append(", "); |
| 966 LogParam(p.url, l); | 969 LogParam(p.url, l); |
| 967 l->append(", "); | 970 l->append(", "); |
| 968 LogParam(p.referrer, l); | 971 LogParam(p.referrer, l); |
| 969 l->append(", "); | 972 l->append(", "); |
| 970 LogParam(p.frame_origin, l); | 973 LogParam(p.frame_origin, l); |
| 971 l->append(", "); | 974 l->append(", "); |
| 972 LogParam(p.main_frame_origin, l); | 975 LogParam(p.main_frame_origin, l); |
| 973 l->append(", "); | 976 l->append(", "); |
| 974 LogParam(p.load_flags, l); | 977 LogParam(p.load_flags, l); |
| 975 l->append(", "); | 978 l->append(", "); |
| 976 LogParam(p.origin_child_id, l); | 979 LogParam(p.origin_child_id, l); |
| 977 l->append(", "); | 980 l->append(", "); |
| 978 LogParam(p.resource_type, l); | 981 LogParam(p.resource_type, l); |
| 979 l->append(", "); | 982 l->append(", "); |
| 980 LogParam(p.request_context, l); | 983 LogParam(p.request_context, l); |
| 981 l->append(", "); | 984 l->append(", "); |
| 982 LogParam(p.appcache_host_id, l); | 985 LogParam(p.appcache_host_id, l); |
| 983 l->append(", "); | 986 l->append(", "); |
| 984 LogParam(p.download_to_file, l); | 987 LogParam(p.download_to_file, l); |
| 985 l->append(", "); | 988 l->append(", "); |
| 989 LogParam(p.has_user_gesture, l); |
| 990 l->append(", "); |
| 986 LogParam(p.host_renderer_id, l); | 991 LogParam(p.host_renderer_id, l); |
| 987 l->append(", "); | 992 l->append(", "); |
| 988 LogParam(p.host_render_view_id, l); | 993 LogParam(p.host_render_view_id, l); |
| 989 l->append(")"); | 994 l->append(")"); |
| 990 } | 995 } |
| 991 | 996 |
| 992 void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) { | 997 void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) { |
| 993 WriteParam(m, p.page_size); | 998 WriteParam(m, p.page_size); |
| 994 WriteParam(m, p.printable_size); | 999 WriteParam(m, p.printable_size); |
| 995 WriteParam(m, p.margin_top); | 1000 WriteParam(m, p.margin_top); |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1918 const param_type& p, | 1923 const param_type& p, |
| 1919 std::string* l) { | 1924 std::string* l) { |
| 1920 l->append("("); | 1925 l->append("("); |
| 1921 LogParam(p.notification_type, l); | 1926 LogParam(p.notification_type, l); |
| 1922 l->append(", "); | 1927 l->append(", "); |
| 1923 LogParam(p.acc_obj, l); | 1928 LogParam(p.acc_obj, l); |
| 1924 l->append(")"); | 1929 l->append(")"); |
| 1925 } | 1930 } |
| 1926 | 1931 |
| 1927 } // namespace IPC | 1932 } // namespace IPC |
| OLD | NEW |