| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 ViewMsg_ClosePage_Params::~ViewMsg_ClosePage_Params() { | 60 ViewMsg_ClosePage_Params::~ViewMsg_ClosePage_Params() { |
| 61 } | 61 } |
| 62 | 62 |
| 63 ViewHostMsg_Resource_Request::ViewHostMsg_Resource_Request() | 63 ViewHostMsg_Resource_Request::ViewHostMsg_Resource_Request() |
| 64 : load_flags(0), | 64 : load_flags(0), |
| 65 origin_pid(0), | 65 origin_pid(0), |
| 66 resource_type(ResourceType::MAIN_FRAME), | 66 resource_type(ResourceType::MAIN_FRAME), |
| 67 request_context(0), | 67 request_context(0), |
| 68 appcache_host_id(0), | 68 appcache_host_id(0), |
| 69 download_to_file(false), | 69 download_to_file(false), |
| 70 has_user_gesture(false), | 70 has_user_gesture(false) { |
| 71 host_renderer_id(0), | |
| 72 host_render_view_id(0) { | |
| 73 } | 71 } |
| 74 | 72 |
| 75 ViewHostMsg_Resource_Request::~ViewHostMsg_Resource_Request() { | 73 ViewHostMsg_Resource_Request::~ViewHostMsg_Resource_Request() { |
| 76 } | 74 } |
| 77 | 75 |
| 78 ViewMsg_Print_Params::ViewMsg_Print_Params() | 76 ViewMsg_Print_Params::ViewMsg_Print_Params() |
| 79 : margin_top(0), | 77 : margin_top(0), |
| 80 margin_left(0), | 78 margin_left(0), |
| 81 dpi(0), | 79 dpi(0), |
| 82 min_shrink(0), | 80 min_shrink(0), |
| (...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 WriteParam(m, p.referrer); | 943 WriteParam(m, p.referrer); |
| 946 WriteParam(m, p.headers); | 944 WriteParam(m, p.headers); |
| 947 WriteParam(m, p.load_flags); | 945 WriteParam(m, p.load_flags); |
| 948 WriteParam(m, p.origin_pid); | 946 WriteParam(m, p.origin_pid); |
| 949 WriteParam(m, p.resource_type); | 947 WriteParam(m, p.resource_type); |
| 950 WriteParam(m, p.request_context); | 948 WriteParam(m, p.request_context); |
| 951 WriteParam(m, p.appcache_host_id); | 949 WriteParam(m, p.appcache_host_id); |
| 952 WriteParam(m, p.upload_data); | 950 WriteParam(m, p.upload_data); |
| 953 WriteParam(m, p.download_to_file); | 951 WriteParam(m, p.download_to_file); |
| 954 WriteParam(m, p.has_user_gesture); | 952 WriteParam(m, p.has_user_gesture); |
| 955 WriteParam(m, p.host_renderer_id); | |
| 956 WriteParam(m, p.host_render_view_id); | |
| 957 } | 953 } |
| 958 | 954 |
| 959 bool ParamTraits<ViewHostMsg_Resource_Request>::Read(const Message* m, | 955 bool ParamTraits<ViewHostMsg_Resource_Request>::Read(const Message* m, |
| 960 void** iter, | 956 void** iter, |
| 961 param_type* r) { | 957 param_type* r) { |
| 962 return | 958 return |
| 963 ReadParam(m, iter, &r->method) && | 959 ReadParam(m, iter, &r->method) && |
| 964 ReadParam(m, iter, &r->url) && | 960 ReadParam(m, iter, &r->url) && |
| 965 ReadParam(m, iter, &r->first_party_for_cookies) && | 961 ReadParam(m, iter, &r->first_party_for_cookies) && |
| 966 ReadParam(m, iter, &r->referrer) && | 962 ReadParam(m, iter, &r->referrer) && |
| 967 ReadParam(m, iter, &r->headers) && | 963 ReadParam(m, iter, &r->headers) && |
| 968 ReadParam(m, iter, &r->load_flags) && | 964 ReadParam(m, iter, &r->load_flags) && |
| 969 ReadParam(m, iter, &r->origin_pid) && | 965 ReadParam(m, iter, &r->origin_pid) && |
| 970 ReadParam(m, iter, &r->resource_type) && | 966 ReadParam(m, iter, &r->resource_type) && |
| 971 ReadParam(m, iter, &r->request_context) && | 967 ReadParam(m, iter, &r->request_context) && |
| 972 ReadParam(m, iter, &r->appcache_host_id) && | 968 ReadParam(m, iter, &r->appcache_host_id) && |
| 973 ReadParam(m, iter, &r->upload_data) && | 969 ReadParam(m, iter, &r->upload_data) && |
| 974 ReadParam(m, iter, &r->download_to_file) && | 970 ReadParam(m, iter, &r->download_to_file) && |
| 975 ReadParam(m, iter, &r->has_user_gesture) && | 971 ReadParam(m, iter, &r->has_user_gesture); |
| 976 ReadParam(m, iter, &r->host_renderer_id) && | |
| 977 ReadParam(m, iter, &r->host_render_view_id); | |
| 978 } | 972 } |
| 979 | 973 |
| 980 void ParamTraits<ViewHostMsg_Resource_Request>::Log(const param_type& p, | 974 void ParamTraits<ViewHostMsg_Resource_Request>::Log(const param_type& p, |
| 981 std::string* l) { | 975 std::string* l) { |
| 982 l->append("("); | 976 l->append("("); |
| 983 LogParam(p.method, l); | 977 LogParam(p.method, l); |
| 984 l->append(", "); | 978 l->append(", "); |
| 985 LogParam(p.url, l); | 979 LogParam(p.url, l); |
| 986 l->append(", "); | 980 l->append(", "); |
| 987 LogParam(p.referrer, l); | 981 LogParam(p.referrer, l); |
| 988 l->append(", "); | 982 l->append(", "); |
| 989 LogParam(p.load_flags, l); | 983 LogParam(p.load_flags, l); |
| 990 l->append(", "); | 984 l->append(", "); |
| 991 LogParam(p.origin_pid, l); | 985 LogParam(p.origin_pid, l); |
| 992 l->append(", "); | 986 l->append(", "); |
| 993 LogParam(p.resource_type, l); | 987 LogParam(p.resource_type, l); |
| 994 l->append(", "); | 988 l->append(", "); |
| 995 LogParam(p.request_context, l); | 989 LogParam(p.request_context, l); |
| 996 l->append(", "); | 990 l->append(", "); |
| 997 LogParam(p.appcache_host_id, l); | 991 LogParam(p.appcache_host_id, l); |
| 998 l->append(", "); | 992 l->append(", "); |
| 999 LogParam(p.download_to_file, l); | 993 LogParam(p.download_to_file, l); |
| 1000 l->append(", "); | 994 l->append(", "); |
| 1001 LogParam(p.has_user_gesture, l); | 995 LogParam(p.has_user_gesture, l); |
| 1002 l->append(", "); | |
| 1003 LogParam(p.host_renderer_id, l); | |
| 1004 l->append(", "); | |
| 1005 LogParam(p.host_render_view_id, l); | |
| 1006 l->append(")"); | 996 l->append(")"); |
| 1007 } | 997 } |
| 1008 | 998 |
| 1009 void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) { | 999 void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) { |
| 1010 WriteParam(m, p.page_size); | 1000 WriteParam(m, p.page_size); |
| 1011 WriteParam(m, p.printable_size); | 1001 WriteParam(m, p.printable_size); |
| 1012 WriteParam(m, p.margin_top); | 1002 WriteParam(m, p.margin_top); |
| 1013 WriteParam(m, p.margin_left); | 1003 WriteParam(m, p.margin_left); |
| 1014 WriteParam(m, p.dpi); | 1004 WriteParam(m, p.dpi); |
| 1015 WriteParam(m, p.min_shrink); | 1005 WriteParam(m, p.min_shrink); |
| (...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1715 l->append(", "); | 1705 l->append(", "); |
| 1716 LogParam(p.tag_name, l); | 1706 LogParam(p.tag_name, l); |
| 1717 l->append(", "); | 1707 l->append(", "); |
| 1718 LogParam(p.parent, l); | 1708 LogParam(p.parent, l); |
| 1719 l->append(", "); | 1709 l->append(", "); |
| 1720 LogParam(p.children, l); | 1710 LogParam(p.children, l); |
| 1721 l->append(")"); | 1711 l->append(")"); |
| 1722 } | 1712 } |
| 1723 | 1713 |
| 1724 } // namespace IPC | 1714 } // namespace IPC |
| OLD | NEW |