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 #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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
| 12 // TODO(erg): This list has been temporarily annotated by erg while doing work |
| 13 // on which headers to pull out. |
12 #include "app/clipboard/clipboard.h" | 14 #include "app/clipboard/clipboard.h" |
13 #include "app/surface/transport_dib.h" | 15 #include "app/surface/transport_dib.h" |
14 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
15 #include "base/platform_file.h" | 17 #include "base/platform_file.h" |
16 #include "base/ref_counted.h" | 18 #include "base/ref_counted.h" |
17 #include "base/shared_memory.h" | 19 #include "base/shared_memory.h" |
18 #include "base/string16.h" | 20 #include "base/string16.h" |
19 #include "chrome/common/common_param_traits.h" | 21 #include "chrome/common/common_param_traits.h" |
20 #include "chrome/common/css_colors.h" | 22 #include "chrome/common/css_colors.h" |
21 #include "chrome/common/dom_storage_common.h" | 23 #include "chrome/common/dom_storage_common.h" |
22 #include "chrome/common/edit_command.h" | 24 #include "chrome/common/extensions/extension_extent.h" // used in struct |
23 #include "chrome/common/extensions/extension_extent.h" | |
24 #include "chrome/common/extensions/url_pattern.h" | |
25 #include "chrome/common/font_descriptor_mac.h" | 25 #include "chrome/common/font_descriptor_mac.h" |
26 #include "chrome/common/indexed_db_key.h" | 26 #include "chrome/common/indexed_db_key.h" // used in struct |
27 #include "chrome/common/navigation_gesture.h" | 27 #include "chrome/common/navigation_gesture.h" |
28 #include "chrome/common/page_transition_types.h" | 28 #include "chrome/common/page_transition_types.h" |
29 #include "chrome/common/renderer_preferences.h" | 29 #include "chrome/common/renderer_preferences.h" // used in struct |
30 #include "chrome/common/resource_response.h" | 30 #include "chrome/common/resource_response.h" |
31 #include "chrome/common/translate_errors.h" | 31 #include "chrome/common/translate_errors.h" |
32 #include "chrome/common/view_types.h" | 32 #include "chrome/common/view_types.h" |
33 #include "chrome/common/serialized_script_value.h" | |
34 #include "chrome/common/webkit_param_traits.h" | 33 #include "chrome/common/webkit_param_traits.h" |
35 #include "chrome/common/window_container_type.h" | 34 #include "chrome/common/window_container_type.h" |
36 #include "gfx/native_widget_types.h" | 35 #include "gfx/native_widget_types.h" |
| 36 #include "gfx/rect.h" |
37 #include "googleurl/src/gurl.h" | 37 #include "googleurl/src/gurl.h" |
38 #include "ipc/ipc_message_utils.h" | 38 #include "ipc/ipc_message_utils.h" |
39 #include "ipc/ipc_platform_file.h" | 39 #include "ipc/ipc_platform_file.h" |
40 #include "media/audio/audio_io.h" | 40 #include "media/audio/audio_io.h" |
41 #include "net/base/upload_data.h" | 41 #include "net/base/upload_data.h" |
42 #include "net/http/http_response_headers.h" | |
43 #include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" | 42 #include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h" |
44 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" | 43 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" |
45 #include "webkit/appcache/appcache_interfaces.h" | 44 #include "webkit/appcache/appcache_interfaces.h" // enum appcache::Status |
46 #include "webkit/glue/context_menu.h" | 45 #include "webkit/glue/password_form.h" // used in struct |
47 #include "webkit/glue/form_data.h" | |
48 #include "webkit/glue/form_field.h" | |
49 #include "webkit/glue/password_form.h" | |
50 #include "webkit/glue/password_form_dom_manager.h" | |
51 #include "webkit/glue/plugins/webplugin.h" | 46 #include "webkit/glue/plugins/webplugin.h" |
52 #include "webkit/glue/plugins/webplugininfo.h" | |
53 #include "webkit/glue/resource_loader_bridge.h" | 47 #include "webkit/glue/resource_loader_bridge.h" |
54 #include "webkit/glue/webaccessibility.h" | |
55 #include "webkit/glue/webcookie.h" | |
56 #include "webkit/glue/webdropdata.h" | |
57 #include "webkit/glue/webmenuitem.h" | 48 #include "webkit/glue/webmenuitem.h" |
58 #include "webkit/glue/webpreferences.h" | 49 #include "webkit/glue/webpreferences.h" // used in struct |
| 50 |
| 51 namespace appcache { |
| 52 struct AppCacheInfo; |
| 53 struct AppCacheResourceInfo; |
| 54 } |
59 | 55 |
60 namespace base { | 56 namespace base { |
61 class Time; | 57 class Time; |
62 } | 58 } |
63 | 59 |
64 namespace net { | 60 namespace net { |
65 class HttpResponseHeaders; | 61 class HttpResponseHeaders; |
66 } | 62 } |
67 | 63 |
68 namespace webkit_glue { | 64 namespace webkit_glue { |
69 struct FormData; | 65 struct FormData; |
70 class FormField; | 66 class FormField; |
71 struct PasswordFormFillData; | 67 struct PasswordFormFillData; |
72 struct WebAccessibility; | 68 struct WebAccessibility; |
73 struct WebCookie; | 69 struct WebCookie; |
74 } | 70 } |
75 | 71 |
76 namespace webkit_glue { | 72 namespace webkit_glue { |
77 struct WebAccessibility; | 73 struct WebAccessibility; |
78 } | 74 } |
79 | 75 |
80 struct EditCommand; | 76 struct EditCommand; |
81 class ExtensionExtent; | 77 class ExtensionExtent; |
82 class IndexedDBKey; | 78 class IndexedDBKey; |
83 class SerializedScriptValue; | 79 class SerializedScriptValue; |
84 | 80 |
85 class SkBitmap; | 81 class SkBitmap; |
| 82 class URLPattern; |
| 83 struct ContextMenuParams; |
| 84 struct WebDropData; |
| 85 struct WebPluginInfo; |
| 86 struct WebPluginMimeType; |
86 | 87 |
87 // Parameters structure for ViewMsg_Navigate, which has too many data | 88 // Parameters structure for ViewMsg_Navigate, which has too many data |
88 // parameters to be reasonably put in a predefined IPC message. | 89 // parameters to be reasonably put in a predefined IPC message. |
89 struct ViewMsg_Navigate_Params { | 90 struct ViewMsg_Navigate_Params { |
90 enum NavigationType { | 91 enum NavigationType { |
91 // Reload the page. | 92 // Reload the page. |
92 RELOAD, | 93 RELOAD, |
93 | 94 |
94 // Reload the page, ignoring any cache entries. | 95 // Reload the page, ignoring any cache entries. |
95 RELOAD_IGNORING_CACHE, | 96 RELOAD_IGNORING_CACHE, |
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 } | 908 } |
908 | 909 |
909 LogParam(type, l); | 910 LogParam(type, l); |
910 } | 911 } |
911 }; | 912 }; |
912 | 913 |
913 // Traits for ViewMsg_Navigate_Params structure to pack/unpack. | 914 // Traits for ViewMsg_Navigate_Params structure to pack/unpack. |
914 template <> | 915 template <> |
915 struct ParamTraits<ViewMsg_Navigate_Params> { | 916 struct ParamTraits<ViewMsg_Navigate_Params> { |
916 typedef ViewMsg_Navigate_Params param_type; | 917 typedef ViewMsg_Navigate_Params param_type; |
917 static void Write(Message* m, const param_type& p) { | 918 static void Write(Message* m, const param_type& p); |
918 WriteParam(m, p.page_id); | 919 static bool Read(const Message* m, void** iter, param_type* p); |
919 WriteParam(m, p.pending_history_list_offset); | 920 static void Log(const param_type& p, std::wstring* l); |
920 WriteParam(m, p.current_history_list_offset); | |
921 WriteParam(m, p.current_history_list_length); | |
922 WriteParam(m, p.url); | |
923 WriteParam(m, p.referrer); | |
924 WriteParam(m, p.transition); | |
925 WriteParam(m, p.state); | |
926 WriteParam(m, p.navigation_type); | |
927 WriteParam(m, p.request_time); | |
928 } | |
929 static bool Read(const Message* m, void** iter, param_type* p) { | |
930 return | |
931 ReadParam(m, iter, &p->page_id) && | |
932 ReadParam(m, iter, &p->pending_history_list_offset) && | |
933 ReadParam(m, iter, &p->current_history_list_offset) && | |
934 ReadParam(m, iter, &p->current_history_list_length) && | |
935 ReadParam(m, iter, &p->url) && | |
936 ReadParam(m, iter, &p->referrer) && | |
937 ReadParam(m, iter, &p->transition) && | |
938 ReadParam(m, iter, &p->state) && | |
939 ReadParam(m, iter, &p->navigation_type) && | |
940 ReadParam(m, iter, &p->request_time); | |
941 } | |
942 static void Log(const param_type& p, std::wstring* l) { | |
943 l->append(L"("); | |
944 LogParam(p.page_id, l); | |
945 l->append(L", "); | |
946 LogParam(p.url, l); | |
947 l->append(L", "); | |
948 LogParam(p.transition, l); | |
949 l->append(L", "); | |
950 LogParam(p.state, l); | |
951 l->append(L", "); | |
952 LogParam(p.navigation_type, l); | |
953 l->append(L", "); | |
954 LogParam(p.request_time, l); | |
955 l->append(L")"); | |
956 } | |
957 }; | 921 }; |
958 | 922 |
959 template<> | 923 template<> |
960 struct ParamTraits<ViewMsg_Navigate_Params::NavigationType> { | 924 struct ParamTraits<ViewMsg_Navigate_Params::NavigationType> { |
961 typedef ViewMsg_Navigate_Params::NavigationType param_type; | 925 typedef ViewMsg_Navigate_Params::NavigationType param_type; |
962 static void Write(Message* m, const param_type& p) { | 926 static void Write(Message* m, const param_type& p) { |
963 m->WriteInt(p); | 927 m->WriteInt(p); |
964 } | 928 } |
965 static bool Read(const Message* m, void** iter, param_type* p) { | 929 static bool Read(const Message* m, void** iter, param_type* p) { |
966 int type; | 930 int type; |
967 if (!m->ReadInt(iter, &type)) | 931 if (!m->ReadInt(iter, &type)) |
968 return false; | 932 return false; |
969 *p = static_cast<ViewMsg_Navigate_Params::NavigationType>(type); | 933 *p = static_cast<ViewMsg_Navigate_Params::NavigationType>(type); |
970 return true; | 934 return true; |
971 } | 935 } |
972 static void Log(const param_type& p, std::wstring* l) { | 936 static void Log(const param_type& p, std::wstring* l) { |
973 std::wstring event; | 937 std::wstring event; |
974 switch (p) { | 938 switch (p) { |
975 case ViewMsg_Navigate_Params::RELOAD: | 939 case ViewMsg_Navigate_Params::RELOAD: |
976 event = L"NavigationType_RELOAD"; | 940 event = L"NavigationType_RELOAD"; |
977 break; | 941 break; |
978 | 942 |
979 case ViewMsg_Navigate_Params::RELOAD_IGNORING_CACHE: | 943 case ViewMsg_Navigate_Params::RELOAD_IGNORING_CACHE: |
980 event = L"NavigationType_RELOAD_IGNORING_CACHE"; | 944 event = L"NavigationType_RELOAD_IGNORING_CACHE"; |
981 break; | 945 break; |
982 | 946 |
983 case ViewMsg_Navigate_Params::RESTORE: | 947 case ViewMsg_Navigate_Params::RESTORE: |
984 event = L"NavigationType_RESTORE"; | 948 event = L"NavigationType_RESTORE"; |
985 break; | 949 break; |
986 | 950 |
987 case ViewMsg_Navigate_Params::NORMAL: | 951 case ViewMsg_Navigate_Params::NORMAL: |
988 event = L"NavigationType_NORMAL"; | 952 event = L"NavigationType_NORMAL"; |
989 break; | 953 break; |
990 | 954 |
991 default: | 955 default: |
992 event = L"NavigationType_UNKNOWN"; | 956 event = L"NavigationType_UNKNOWN"; |
993 break; | 957 break; |
994 } | 958 } |
995 LogParam(event, l); | 959 LogParam(event, l); |
996 } | 960 } |
997 }; | 961 }; |
998 | 962 |
999 // Traits for FormField_Params structure to pack/unpack. | 963 // Traits for FormField_Params structure to pack/unpack. |
1000 template <> | 964 template <> |
1001 struct ParamTraits<webkit_glue::FormField> { | 965 struct ParamTraits<webkit_glue::FormField> { |
1002 typedef webkit_glue::FormField param_type; | 966 typedef webkit_glue::FormField param_type; |
1003 static void Write(Message* m, const param_type& p) { | 967 static void Write(Message* m, const param_type& p); |
1004 WriteParam(m, p.label()); | 968 static bool Read(const Message* m, void** iter, param_type* p); |
1005 WriteParam(m, p.name()); | 969 static void Log(const param_type& p, std::wstring* l); |
1006 WriteParam(m, p.value()); | |
1007 WriteParam(m, p.form_control_type()); | |
1008 WriteParam(m, p.size()); | |
1009 WriteParam(m, p.option_strings()); | |
1010 } | |
1011 static bool Read(const Message* m, void** iter, param_type* p) { | |
1012 string16 label, name, value, form_control_type; | |
1013 int size = 0; | |
1014 std::vector<string16> options; | |
1015 bool result = ReadParam(m, iter, &label); | |
1016 result = result && ReadParam(m, iter, &name); | |
1017 result = result && ReadParam(m, iter, &value); | |
1018 result = result && ReadParam(m, iter, &form_control_type); | |
1019 result = result && ReadParam(m, iter, &size); | |
1020 result = result && ReadParam(m, iter, &options); | |
1021 if (!result) | |
1022 return false; | |
1023 | |
1024 p->set_label(label); | |
1025 p->set_name(name); | |
1026 p->set_value(value); | |
1027 p->set_form_control_type(form_control_type); | |
1028 p->set_size(size); | |
1029 p->set_option_strings(options); | |
1030 return true; | |
1031 } | |
1032 static void Log(const param_type& p, std::wstring* l) { | |
1033 l->append(L"<FormField>"); | |
1034 } | |
1035 }; | 970 }; |
1036 | 971 |
1037 // Traits for FontDescriptor structure to pack/unpack. | 972 // Traits for FontDescriptor structure to pack/unpack. |
1038 template <> | 973 template <> |
1039 struct ParamTraits<FontDescriptor> { | 974 struct ParamTraits<FontDescriptor> { |
1040 typedef FontDescriptor param_type; | 975 typedef FontDescriptor param_type; |
1041 static void Write(Message* m, const param_type& p) { | 976 static void Write(Message* m, const param_type& p) { |
1042 WriteParam(m, p.font_name); | 977 WriteParam(m, p.font_name); |
1043 WriteParam(m, p.font_point_size); | 978 WriteParam(m, p.font_point_size); |
1044 } | 979 } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 LogParam(p.is_content_filtered, l); | 1100 LogParam(p.is_content_filtered, l); |
1166 l->append(L", "); | 1101 l->append(L", "); |
1167 LogParam(p.http_status_code, l); | 1102 LogParam(p.http_status_code, l); |
1168 l->append(L")"); | 1103 l->append(L")"); |
1169 } | 1104 } |
1170 }; | 1105 }; |
1171 | 1106 |
1172 template <> | 1107 template <> |
1173 struct ParamTraits<ContextMenuParams> { | 1108 struct ParamTraits<ContextMenuParams> { |
1174 typedef ContextMenuParams param_type; | 1109 typedef ContextMenuParams param_type; |
1175 static void Write(Message* m, const param_type& p) { | 1110 static void Write(Message* m, const param_type& p); |
1176 WriteParam(m, p.media_type); | 1111 static bool Read(const Message* m, void** iter, param_type* p); |
1177 WriteParam(m, p.x); | 1112 static void Log(const param_type& p, std::wstring* l); |
1178 WriteParam(m, p.y); | |
1179 WriteParam(m, p.link_url); | |
1180 WriteParam(m, p.unfiltered_link_url); | |
1181 WriteParam(m, p.src_url); | |
1182 WriteParam(m, p.is_image_blocked); | |
1183 WriteParam(m, p.page_url); | |
1184 WriteParam(m, p.frame_url); | |
1185 WriteParam(m, p.media_flags); | |
1186 WriteParam(m, p.selection_text); | |
1187 WriteParam(m, p.misspelled_word); | |
1188 WriteParam(m, p.dictionary_suggestions); | |
1189 WriteParam(m, p.spellcheck_enabled); | |
1190 WriteParam(m, p.is_editable); | |
1191 #if defined(OS_MACOSX) | |
1192 WriteParam(m, p.writing_direction_default); | |
1193 WriteParam(m, p.writing_direction_left_to_right); | |
1194 WriteParam(m, p.writing_direction_right_to_left); | |
1195 #endif // OS_MACOSX | |
1196 WriteParam(m, p.edit_flags); | |
1197 WriteParam(m, p.security_info); | |
1198 WriteParam(m, p.frame_charset); | |
1199 WriteParam(m, p.custom_items); | |
1200 } | |
1201 static bool Read(const Message* m, void** iter, param_type* p) { | |
1202 return | |
1203 ReadParam(m, iter, &p->media_type) && | |
1204 ReadParam(m, iter, &p->x) && | |
1205 ReadParam(m, iter, &p->y) && | |
1206 ReadParam(m, iter, &p->link_url) && | |
1207 ReadParam(m, iter, &p->unfiltered_link_url) && | |
1208 ReadParam(m, iter, &p->src_url) && | |
1209 ReadParam(m, iter, &p->is_image_blocked) && | |
1210 ReadParam(m, iter, &p->page_url) && | |
1211 ReadParam(m, iter, &p->frame_url) && | |
1212 ReadParam(m, iter, &p->media_flags) && | |
1213 ReadParam(m, iter, &p->selection_text) && | |
1214 ReadParam(m, iter, &p->misspelled_word) && | |
1215 ReadParam(m, iter, &p->dictionary_suggestions) && | |
1216 ReadParam(m, iter, &p->spellcheck_enabled) && | |
1217 ReadParam(m, iter, &p->is_editable) && | |
1218 #if defined(OS_MACOSX) | |
1219 ReadParam(m, iter, &p->writing_direction_default) && | |
1220 ReadParam(m, iter, &p->writing_direction_left_to_right) && | |
1221 ReadParam(m, iter, &p->writing_direction_right_to_left) && | |
1222 #endif // OS_MACOSX | |
1223 ReadParam(m, iter, &p->edit_flags) && | |
1224 ReadParam(m, iter, &p->security_info) && | |
1225 ReadParam(m, iter, &p->frame_charset) && | |
1226 ReadParam(m, iter, &p->custom_items); | |
1227 } | |
1228 static void Log(const param_type& p, std::wstring* l) { | |
1229 l->append(L"<ContextMenuParams>"); | |
1230 } | |
1231 }; | 1113 }; |
1232 | 1114 |
1233 // Traits for ViewHostMsg_UpdateRect_Params structure to pack/unpack. | 1115 // Traits for ViewHostMsg_UpdateRect_Params structure to pack/unpack. |
1234 template <> | 1116 template <> |
1235 struct ParamTraits<ViewHostMsg_UpdateRect_Params> { | 1117 struct ParamTraits<ViewHostMsg_UpdateRect_Params> { |
1236 typedef ViewHostMsg_UpdateRect_Params param_type; | 1118 typedef ViewHostMsg_UpdateRect_Params param_type; |
1237 static void Write(Message* m, const param_type& p) { | 1119 static void Write(Message* m, const param_type& p); |
1238 WriteParam(m, p.bitmap); | 1120 static bool Read(const Message* m, void** iter, param_type* p); |
1239 WriteParam(m, p.bitmap_rect); | 1121 static void Log(const param_type& p, std::wstring* l); |
1240 WriteParam(m, p.dx); | |
1241 WriteParam(m, p.dy); | |
1242 WriteParam(m, p.scroll_rect); | |
1243 WriteParam(m, p.copy_rects); | |
1244 WriteParam(m, p.view_size); | |
1245 WriteParam(m, p.plugin_window_moves); | |
1246 WriteParam(m, p.flags); | |
1247 } | |
1248 static bool Read(const Message* m, void** iter, param_type* p) { | |
1249 return | |
1250 ReadParam(m, iter, &p->bitmap) && | |
1251 ReadParam(m, iter, &p->bitmap_rect) && | |
1252 ReadParam(m, iter, &p->dx) && | |
1253 ReadParam(m, iter, &p->dy) && | |
1254 ReadParam(m, iter, &p->scroll_rect) && | |
1255 ReadParam(m, iter, &p->copy_rects) && | |
1256 ReadParam(m, iter, &p->view_size) && | |
1257 ReadParam(m, iter, &p->plugin_window_moves) && | |
1258 ReadParam(m, iter, &p->flags); | |
1259 } | |
1260 static void Log(const param_type& p, std::wstring* l) { | |
1261 l->append(L"("); | |
1262 LogParam(p.bitmap, l); | |
1263 l->append(L", "); | |
1264 LogParam(p.bitmap_rect, l); | |
1265 l->append(L", "); | |
1266 LogParam(p.dx, l); | |
1267 l->append(L", "); | |
1268 LogParam(p.dy, l); | |
1269 l->append(L", "); | |
1270 LogParam(p.scroll_rect, l); | |
1271 l->append(L", "); | |
1272 LogParam(p.copy_rects, l); | |
1273 l->append(L", "); | |
1274 LogParam(p.view_size, l); | |
1275 l->append(L", "); | |
1276 LogParam(p.plugin_window_moves, l); | |
1277 l->append(L", "); | |
1278 LogParam(p.flags, l); | |
1279 l->append(L")"); | |
1280 } | |
1281 }; | 1122 }; |
1282 | 1123 |
1283 template <> | 1124 template <> |
1284 struct ParamTraits<webkit_glue::WebPluginGeometry> { | 1125 struct ParamTraits<webkit_glue::WebPluginGeometry> { |
1285 typedef webkit_glue::WebPluginGeometry param_type; | 1126 typedef webkit_glue::WebPluginGeometry param_type; |
1286 static void Write(Message* m, const param_type& p) { | 1127 static void Write(Message* m, const param_type& p); |
1287 WriteParam(m, p.window); | 1128 static bool Read(const Message* m, void** iter, param_type* p); |
1288 WriteParam(m, p.window_rect); | 1129 static void Log(const param_type& p, std::wstring* l); |
1289 WriteParam(m, p.clip_rect); | |
1290 WriteParam(m, p.cutout_rects); | |
1291 WriteParam(m, p.rects_valid); | |
1292 WriteParam(m, p.visible); | |
1293 } | |
1294 static bool Read(const Message* m, void** iter, param_type* p) { | |
1295 return | |
1296 ReadParam(m, iter, &p->window) && | |
1297 ReadParam(m, iter, &p->window_rect) && | |
1298 ReadParam(m, iter, &p->clip_rect) && | |
1299 ReadParam(m, iter, &p->cutout_rects) && | |
1300 ReadParam(m, iter, &p->rects_valid) && | |
1301 ReadParam(m, iter, &p->visible); | |
1302 } | |
1303 static void Log(const param_type& p, std::wstring* l) { | |
1304 l->append(L"("); | |
1305 LogParam(p.window, l); | |
1306 l->append(L", "); | |
1307 LogParam(p.window_rect, l); | |
1308 l->append(L", "); | |
1309 LogParam(p.clip_rect, l); | |
1310 l->append(L", "); | |
1311 LogParam(p.cutout_rects, l); | |
1312 l->append(L", "); | |
1313 LogParam(p.rects_valid, l); | |
1314 l->append(L", "); | |
1315 LogParam(p.visible, l); | |
1316 l->append(L")"); | |
1317 } | |
1318 }; | 1130 }; |
1319 | 1131 |
1320 // Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack. | 1132 // Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack. |
1321 template <> | 1133 template <> |
1322 struct ParamTraits<WebPluginMimeType> { | 1134 struct ParamTraits<WebPluginMimeType> { |
1323 typedef WebPluginMimeType param_type; | 1135 typedef WebPluginMimeType param_type; |
1324 static void Write(Message* m, const param_type& p) { | 1136 static void Write(Message* m, const param_type& p); |
1325 WriteParam(m, p.mime_type); | 1137 static bool Read(const Message* m, void** iter, param_type* r); |
1326 WriteParam(m, p.file_extensions); | 1138 static void Log(const param_type& p, std::wstring* l); |
1327 WriteParam(m, p.description); | |
1328 } | |
1329 static bool Read(const Message* m, void** iter, param_type* r) { | |
1330 return | |
1331 ReadParam(m, iter, &r->mime_type) && | |
1332 ReadParam(m, iter, &r->file_extensions) && | |
1333 ReadParam(m, iter, &r->description); | |
1334 } | |
1335 static void Log(const param_type& p, std::wstring* l) { | |
1336 l->append(L"("); | |
1337 LogParam(p.mime_type, l); | |
1338 l->append(L", "); | |
1339 LogParam(p.file_extensions, l); | |
1340 l->append(L", "); | |
1341 LogParam(p.description, l); | |
1342 l->append(L")"); | |
1343 } | |
1344 }; | 1139 }; |
1345 | 1140 |
1346 | |
1347 template <> | 1141 template <> |
1348 struct ParamTraits<WebPluginInfo> { | 1142 struct ParamTraits<WebPluginInfo> { |
1349 typedef WebPluginInfo param_type; | 1143 typedef WebPluginInfo param_type; |
1350 static void Write(Message* m, const param_type& p) { | 1144 static void Write(Message* m, const param_type& p); |
1351 WriteParam(m, p.name); | 1145 static bool Read(const Message* m, void** iter, param_type* r); |
1352 WriteParam(m, p.path); | 1146 static void Log(const param_type& p, std::wstring* l); |
1353 WriteParam(m, p.version); | |
1354 WriteParam(m, p.desc); | |
1355 WriteParam(m, p.mime_types); | |
1356 WriteParam(m, p.enabled); | |
1357 } | |
1358 static bool Read(const Message* m, void** iter, param_type* r) { | |
1359 return | |
1360 ReadParam(m, iter, &r->name) && | |
1361 ReadParam(m, iter, &r->path) && | |
1362 ReadParam(m, iter, &r->version) && | |
1363 ReadParam(m, iter, &r->desc) && | |
1364 ReadParam(m, iter, &r->mime_types) && | |
1365 ReadParam(m, iter, &r->enabled); | |
1366 } | |
1367 static void Log(const param_type& p, std::wstring* l) { | |
1368 l->append(L"("); | |
1369 LogParam(p.name, l); | |
1370 l->append(L", "); | |
1371 l->append(L", "); | |
1372 LogParam(p.path, l); | |
1373 l->append(L", "); | |
1374 LogParam(p.version, l); | |
1375 l->append(L", "); | |
1376 LogParam(p.desc, l); | |
1377 l->append(L", "); | |
1378 LogParam(p.mime_types, l); | |
1379 l->append(L", "); | |
1380 LogParam(p.enabled, l); | |
1381 l->append(L")"); | |
1382 } | |
1383 }; | 1147 }; |
1384 | 1148 |
1385 // Traits for webkit_glue::PasswordFormDomManager::FillData. | 1149 // Traits for webkit_glue::PasswordFormDomManager::FillData. |
1386 template <> | 1150 template <> |
1387 struct ParamTraits<webkit_glue::PasswordFormFillData> { | 1151 struct ParamTraits<webkit_glue::PasswordFormFillData> { |
1388 typedef webkit_glue::PasswordFormFillData param_type; | 1152 typedef webkit_glue::PasswordFormFillData param_type; |
1389 static void Write(Message* m, const param_type& p) { | 1153 static void Write(Message* m, const param_type& p); |
1390 WriteParam(m, p.basic_data); | 1154 static bool Read(const Message* m, void** iter, param_type* r); |
1391 WriteParam(m, p.additional_logins); | 1155 static void Log(const param_type& p, std::wstring* l); |
1392 WriteParam(m, p.wait_for_username); | |
1393 } | |
1394 static bool Read(const Message* m, void** iter, param_type* r) { | |
1395 return | |
1396 ReadParam(m, iter, &r->basic_data) && | |
1397 ReadParam(m, iter, &r->additional_logins) && | |
1398 ReadParam(m, iter, &r->wait_for_username); | |
1399 } | |
1400 static void Log(const param_type& p, std::wstring* l) { | |
1401 l->append(L"<PasswordFormFillData>"); | |
1402 } | |
1403 }; | 1156 }; |
1404 | 1157 |
1405 template<> | 1158 template<> |
1406 struct ParamTraits<NavigationGesture> { | 1159 struct ParamTraits<NavigationGesture> { |
1407 typedef NavigationGesture param_type; | 1160 typedef NavigationGesture param_type; |
1408 static void Write(Message* m, const param_type& p) { | 1161 static void Write(Message* m, const param_type& p) { |
1409 m->WriteInt(p); | 1162 m->WriteInt(p); |
1410 } | 1163 } |
1411 static bool Read(const Message* m, void** iter, param_type* p) { | 1164 static bool Read(const Message* m, void** iter, param_type* p) { |
1412 int type; | 1165 int type; |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1535 LogParam(p.host_renderer_id, l); | 1288 LogParam(p.host_renderer_id, l); |
1536 l->append(L", "); | 1289 l->append(L", "); |
1537 LogParam(p.host_render_view_id, l); | 1290 LogParam(p.host_render_view_id, l); |
1538 l->append(L")"); | 1291 l->append(L")"); |
1539 } | 1292 } |
1540 }; | 1293 }; |
1541 | 1294 |
1542 template <> | 1295 template <> |
1543 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { | 1296 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders> > { |
1544 typedef scoped_refptr<net::HttpResponseHeaders> param_type; | 1297 typedef scoped_refptr<net::HttpResponseHeaders> param_type; |
1545 static void Write(Message* m, const param_type& p) { | 1298 static void Write(Message* m, const param_type& p); |
1546 WriteParam(m, p.get() != NULL); | 1299 static bool Read(const Message* m, void** iter, param_type* r); |
1547 if (p) { | 1300 static void Log(const param_type& p, std::wstring* l); |
1548 // Do not disclose Set-Cookie headers over IPC. | |
1549 p->Persist(m, net::HttpResponseHeaders::PERSIST_SANS_COOKIES); | |
1550 } | |
1551 } | |
1552 static bool Read(const Message* m, void** iter, param_type* r) { | |
1553 bool has_object; | |
1554 if (!ReadParam(m, iter, &has_object)) | |
1555 return false; | |
1556 if (has_object) | |
1557 *r = new net::HttpResponseHeaders(*m, iter); | |
1558 return true; | |
1559 } | |
1560 static void Log(const param_type& p, std::wstring* l) { | |
1561 l->append(L"<HttpResponseHeaders>"); | |
1562 } | |
1563 }; | 1301 }; |
1564 | 1302 |
1565 // Traits for webkit_glue::ResourceLoaderBridge::LoadTimingInfo | 1303 // Traits for webkit_glue::ResourceLoaderBridge::LoadTimingInfo |
1566 template <> | 1304 template <> |
1567 struct ParamTraits<webkit_glue::ResourceLoaderBridge::LoadTimingInfo> { | 1305 struct ParamTraits<webkit_glue::ResourceLoaderBridge::LoadTimingInfo> { |
1568 typedef webkit_glue::ResourceLoaderBridge::LoadTimingInfo param_type; | 1306 typedef webkit_glue::ResourceLoaderBridge::LoadTimingInfo param_type; |
1569 static void Write(Message* m, const param_type& p) { | 1307 static void Write(Message* m, const param_type& p) { |
1570 WriteParam(m, p.base_time.is_null()); | 1308 WriteParam(m, p.base_time.is_null()); |
1571 if (p.base_time.is_null()) | 1309 if (p.base_time.is_null()) |
1572 return; | 1310 return; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1755 } | 1493 } |
1756 static void Log(const param_type& p, std::wstring* l) { | 1494 static void Log(const param_type& p, std::wstring* l) { |
1757 // log more? | 1495 // log more? |
1758 ParamTraits<webkit_glue::ResourceLoaderBridge::ResponseInfo>::Log(p, l); | 1496 ParamTraits<webkit_glue::ResourceLoaderBridge::ResponseInfo>::Log(p, l); |
1759 } | 1497 } |
1760 }; | 1498 }; |
1761 | 1499 |
1762 template <> | 1500 template <> |
1763 struct ParamTraits<SerializedScriptValue> { | 1501 struct ParamTraits<SerializedScriptValue> { |
1764 typedef SerializedScriptValue param_type; | 1502 typedef SerializedScriptValue param_type; |
1765 static void Write(Message* m, const param_type& p) { | 1503 static void Write(Message* m, const param_type& p); |
1766 WriteParam(m, p.is_null()); | 1504 static bool Read(const Message* m, void** iter, param_type* r); |
1767 WriteParam(m, p.is_invalid()); | 1505 static void Log(const param_type& p, std::wstring* l); |
1768 WriteParam(m, p.data()); | |
1769 } | |
1770 static bool Read(const Message* m, void** iter, param_type* r) { | |
1771 bool is_null; | |
1772 bool is_invalid; | |
1773 string16 data; | |
1774 bool ok = | |
1775 ReadParam(m, iter, &is_null) && | |
1776 ReadParam(m, iter, &is_invalid) && | |
1777 ReadParam(m, iter, &data); | |
1778 if (!ok) | |
1779 return false; | |
1780 r->set_is_null(is_null); | |
1781 r->set_is_invalid(is_invalid); | |
1782 r->set_data(data); | |
1783 return true; | |
1784 } | |
1785 static void Log(const param_type& p, std::wstring* l) { | |
1786 l->append(L"<SerializedScriptValue>("); | |
1787 LogParam(p.is_null(), l); | |
1788 l->append(L", "); | |
1789 LogParam(p.is_invalid(), l); | |
1790 l->append(L", "); | |
1791 LogParam(p.data(), l); | |
1792 l->append(L")"); | |
1793 } | |
1794 }; | 1506 }; |
1795 | 1507 |
1796 template <> | 1508 template <> |
1797 struct ParamTraits<IndexedDBKey> { | 1509 struct ParamTraits<IndexedDBKey> { |
1798 typedef IndexedDBKey param_type; | 1510 typedef IndexedDBKey param_type; |
1799 static void Write(Message* m, const param_type& p) { | 1511 static void Write(Message* m, const param_type& p); |
1800 WriteParam(m, int(p.type())); | 1512 static bool Read(const Message* m, void** iter, param_type* r); |
1801 // TODO(jorlow): Technically, we only need to pack the type being used. | 1513 static void Log(const param_type& p, std::wstring* l); |
1802 WriteParam(m, p.string()); | |
1803 WriteParam(m, p.number()); | |
1804 } | |
1805 static bool Read(const Message* m, void** iter, param_type* r) { | |
1806 int type; | |
1807 string16 string; | |
1808 int32 number; | |
1809 bool ok = | |
1810 ReadParam(m, iter, &type) && | |
1811 ReadParam(m, iter, &string) && | |
1812 ReadParam(m, iter, &number); | |
1813 if (!ok) | |
1814 return false; | |
1815 switch (type) { | |
1816 case WebKit::WebIDBKey::NullType: | |
1817 r->SetNull(); | |
1818 return true; | |
1819 case WebKit::WebIDBKey::StringType: | |
1820 r->Set(string); | |
1821 return true; | |
1822 case WebKit::WebIDBKey::NumberType: | |
1823 r->Set(number); | |
1824 return true; | |
1825 case WebKit::WebIDBKey::InvalidType: | |
1826 r->SetInvalid(); | |
1827 return true; | |
1828 } | |
1829 NOTREACHED(); | |
1830 return false; | |
1831 } | |
1832 static void Log(const param_type& p, std::wstring* l) { | |
1833 l->append(L"<IndexedDBKey>("); | |
1834 LogParam(int(p.type()), l); | |
1835 l->append(L", "); | |
1836 LogParam(p.string(), l); | |
1837 l->append(L", "); | |
1838 LogParam(p.number(), l); | |
1839 l->append(L")"); | |
1840 } | |
1841 }; | 1514 }; |
1842 | 1515 |
1843 // Traits for FormData structure to pack/unpack. | 1516 // Traits for FormData structure to pack/unpack. |
1844 template <> | 1517 template <> |
1845 struct ParamTraits<webkit_glue::FormData> { | 1518 struct ParamTraits<webkit_glue::FormData> { |
1846 typedef webkit_glue::FormData param_type; | 1519 typedef webkit_glue::FormData param_type; |
1847 static void Write(Message* m, const param_type& p) { | 1520 static void Write(Message* m, const param_type& p); |
1848 WriteParam(m, p.name); | 1521 static bool Read(const Message* m, void** iter, param_type* p); |
1849 WriteParam(m, p.method); | 1522 static void Log(const param_type& p, std::wstring* l); |
1850 WriteParam(m, p.origin); | |
1851 WriteParam(m, p.action); | |
1852 WriteParam(m, p.user_submitted); | |
1853 WriteParam(m, p.fields); | |
1854 } | |
1855 static bool Read(const Message* m, void** iter, param_type* p) { | |
1856 return | |
1857 ReadParam(m, iter, &p->name) && | |
1858 ReadParam(m, iter, &p->method) && | |
1859 ReadParam(m, iter, &p->origin) && | |
1860 ReadParam(m, iter, &p->action) && | |
1861 ReadParam(m, iter, &p->user_submitted) && | |
1862 ReadParam(m, iter, &p->fields); | |
1863 } | |
1864 static void Log(const param_type& p, std::wstring* l) { | |
1865 l->append(L"<FormData>"); | |
1866 } | |
1867 }; | 1523 }; |
1868 | 1524 |
1869 // Traits for ViewMsg_Print_Params | 1525 // Traits for ViewMsg_Print_Params |
1870 template <> | 1526 template <> |
1871 struct ParamTraits<ViewMsg_Print_Params> { | 1527 struct ParamTraits<ViewMsg_Print_Params> { |
1872 typedef ViewMsg_Print_Params param_type; | 1528 typedef ViewMsg_Print_Params param_type; |
1873 static void Write(Message* m, const param_type& p) { | 1529 static void Write(Message* m, const param_type& p) { |
1874 WriteParam(m, p.page_size); | 1530 WriteParam(m, p.page_size); |
1875 WriteParam(m, p.printable_size); | 1531 WriteParam(m, p.printable_size); |
1876 WriteParam(m, p.margin_top); | 1532 WriteParam(m, p.margin_top); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1975 static void Log(const param_type& p, std::wstring* l) { | 1631 static void Log(const param_type& p, std::wstring* l) { |
1976 l->append(L"<CSSColorName>"); | 1632 l->append(L"<CSSColorName>"); |
1977 } | 1633 } |
1978 }; | 1634 }; |
1979 | 1635 |
1980 | 1636 |
1981 // Traits for RendererPreferences structure to pack/unpack. | 1637 // Traits for RendererPreferences structure to pack/unpack. |
1982 template <> | 1638 template <> |
1983 struct ParamTraits<RendererPreferences> { | 1639 struct ParamTraits<RendererPreferences> { |
1984 typedef RendererPreferences param_type; | 1640 typedef RendererPreferences param_type; |
1985 static void Write(Message* m, const param_type& p) { | 1641 static void Write(Message* m, const param_type& p); |
1986 WriteParam(m, p.can_accept_load_drops); | 1642 static bool Read(const Message* m, void** iter, param_type* p); |
1987 WriteParam(m, p.should_antialias_text); | 1643 static void Log(const param_type& p, std::wstring* l); |
1988 WriteParam(m, static_cast<int>(p.hinting)); | |
1989 WriteParam(m, static_cast<int>(p.subpixel_rendering)); | |
1990 WriteParam(m, p.focus_ring_color); | |
1991 WriteParam(m, p.thumb_active_color); | |
1992 WriteParam(m, p.thumb_inactive_color); | |
1993 WriteParam(m, p.track_color); | |
1994 WriteParam(m, p.active_selection_bg_color); | |
1995 WriteParam(m, p.active_selection_fg_color); | |
1996 WriteParam(m, p.inactive_selection_bg_color); | |
1997 WriteParam(m, p.inactive_selection_fg_color); | |
1998 WriteParam(m, p.browser_handles_top_level_requests); | |
1999 WriteParam(m, p.caret_blink_interval); | |
2000 } | |
2001 static bool Read(const Message* m, void** iter, param_type* p) { | |
2002 if (!ReadParam(m, iter, &p->can_accept_load_drops)) | |
2003 return false; | |
2004 if (!ReadParam(m, iter, &p->should_antialias_text)) | |
2005 return false; | |
2006 | |
2007 int hinting = 0; | |
2008 if (!ReadParam(m, iter, &hinting)) | |
2009 return false; | |
2010 p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting); | |
2011 | |
2012 int subpixel_rendering = 0; | |
2013 if (!ReadParam(m, iter, &subpixel_rendering)) | |
2014 return false; | |
2015 p->subpixel_rendering = | |
2016 static_cast<RendererPreferencesSubpixelRenderingEnum>( | |
2017 subpixel_rendering); | |
2018 | |
2019 int focus_ring_color; | |
2020 if (!ReadParam(m, iter, &focus_ring_color)) | |
2021 return false; | |
2022 p->focus_ring_color = focus_ring_color; | |
2023 | |
2024 int thumb_active_color, thumb_inactive_color, track_color; | |
2025 int active_selection_bg_color, active_selection_fg_color; | |
2026 int inactive_selection_bg_color, inactive_selection_fg_color; | |
2027 if (!ReadParam(m, iter, &thumb_active_color) || | |
2028 !ReadParam(m, iter, &thumb_inactive_color) || | |
2029 !ReadParam(m, iter, &track_color) || | |
2030 !ReadParam(m, iter, &active_selection_bg_color) || | |
2031 !ReadParam(m, iter, &active_selection_fg_color) || | |
2032 !ReadParam(m, iter, &inactive_selection_bg_color) || | |
2033 !ReadParam(m, iter, &inactive_selection_fg_color)) | |
2034 return false; | |
2035 p->thumb_active_color = thumb_active_color; | |
2036 p->thumb_inactive_color = thumb_inactive_color; | |
2037 p->track_color = track_color; | |
2038 p->active_selection_bg_color = active_selection_bg_color; | |
2039 p->active_selection_fg_color = active_selection_fg_color; | |
2040 p->inactive_selection_bg_color = inactive_selection_bg_color; | |
2041 p->inactive_selection_fg_color = inactive_selection_fg_color; | |
2042 | |
2043 if (!ReadParam(m, iter, &p->browser_handles_top_level_requests)) | |
2044 return false; | |
2045 | |
2046 if (!ReadParam(m, iter, &p->caret_blink_interval)) | |
2047 return false; | |
2048 | |
2049 return true; | |
2050 } | |
2051 static void Log(const param_type& p, std::wstring* l) { | |
2052 l->append(L"<RendererPreferences>"); | |
2053 } | |
2054 }; | 1644 }; |
2055 | 1645 |
2056 // Traits for WebPreferences structure to pack/unpack. | 1646 // Traits for WebPreferences structure to pack/unpack. |
2057 template <> | 1647 template <> |
2058 struct ParamTraits<WebPreferences> { | 1648 struct ParamTraits<WebPreferences> { |
2059 typedef WebPreferences param_type; | 1649 typedef WebPreferences param_type; |
2060 static void Write(Message* m, const param_type& p) { | 1650 static void Write(Message* m, const param_type& p); |
2061 WriteParam(m, p.standard_font_family); | 1651 static bool Read(const Message* m, void** iter, param_type* p); |
2062 WriteParam(m, p.fixed_font_family); | 1652 static void Log(const param_type& p, std::wstring* l); |
2063 WriteParam(m, p.serif_font_family); | |
2064 WriteParam(m, p.sans_serif_font_family); | |
2065 WriteParam(m, p.cursive_font_family); | |
2066 WriteParam(m, p.fantasy_font_family); | |
2067 WriteParam(m, p.default_font_size); | |
2068 WriteParam(m, p.default_fixed_font_size); | |
2069 WriteParam(m, p.minimum_font_size); | |
2070 WriteParam(m, p.minimum_logical_font_size); | |
2071 WriteParam(m, p.default_encoding); | |
2072 WriteParam(m, p.javascript_enabled); | |
2073 WriteParam(m, p.web_security_enabled); | |
2074 WriteParam(m, p.javascript_can_open_windows_automatically); | |
2075 WriteParam(m, p.loads_images_automatically); | |
2076 WriteParam(m, p.plugins_enabled); | |
2077 WriteParam(m, p.dom_paste_enabled); | |
2078 WriteParam(m, p.developer_extras_enabled); | |
2079 WriteParam(m, p.inspector_settings); | |
2080 WriteParam(m, p.site_specific_quirks_enabled); | |
2081 WriteParam(m, p.shrinks_standalone_images_to_fit); | |
2082 WriteParam(m, p.uses_universal_detector); | |
2083 WriteParam(m, p.text_areas_are_resizable); | |
2084 WriteParam(m, p.java_enabled); | |
2085 WriteParam(m, p.allow_scripts_to_close_windows); | |
2086 WriteParam(m, p.uses_page_cache); | |
2087 WriteParam(m, p.remote_fonts_enabled); | |
2088 WriteParam(m, p.javascript_can_access_clipboard); | |
2089 WriteParam(m, p.xss_auditor_enabled); | |
2090 WriteParam(m, p.local_storage_enabled); | |
2091 WriteParam(m, p.databases_enabled); | |
2092 WriteParam(m, p.application_cache_enabled); | |
2093 WriteParam(m, p.tabs_to_links); | |
2094 WriteParam(m, p.user_style_sheet_enabled); | |
2095 WriteParam(m, p.user_style_sheet_location); | |
2096 WriteParam(m, p.author_and_user_styles_enabled); | |
2097 WriteParam(m, p.allow_universal_access_from_file_urls); | |
2098 WriteParam(m, p.allow_file_access_from_file_urls); | |
2099 WriteParam(m, p.experimental_webgl_enabled); | |
2100 WriteParam(m, p.show_composited_layer_borders); | |
2101 WriteParam(m, p.accelerated_compositing_enabled); | |
2102 WriteParam(m, p.accelerated_2d_canvas_enabled); | |
2103 WriteParam(m, p.memory_info_enabled); | |
2104 } | |
2105 static bool Read(const Message* m, void** iter, param_type* p) { | |
2106 return | |
2107 ReadParam(m, iter, &p->standard_font_family) && | |
2108 ReadParam(m, iter, &p->fixed_font_family) && | |
2109 ReadParam(m, iter, &p->serif_font_family) && | |
2110 ReadParam(m, iter, &p->sans_serif_font_family) && | |
2111 ReadParam(m, iter, &p->cursive_font_family) && | |
2112 ReadParam(m, iter, &p->fantasy_font_family) && | |
2113 ReadParam(m, iter, &p->default_font_size) && | |
2114 ReadParam(m, iter, &p->default_fixed_font_size) && | |
2115 ReadParam(m, iter, &p->minimum_font_size) && | |
2116 ReadParam(m, iter, &p->minimum_logical_font_size) && | |
2117 ReadParam(m, iter, &p->default_encoding) && | |
2118 ReadParam(m, iter, &p->javascript_enabled) && | |
2119 ReadParam(m, iter, &p->web_security_enabled) && | |
2120 ReadParam(m, iter, &p->javascript_can_open_windows_automatically) && | |
2121 ReadParam(m, iter, &p->loads_images_automatically) && | |
2122 ReadParam(m, iter, &p->plugins_enabled) && | |
2123 ReadParam(m, iter, &p->dom_paste_enabled) && | |
2124 ReadParam(m, iter, &p->developer_extras_enabled) && | |
2125 ReadParam(m, iter, &p->inspector_settings) && | |
2126 ReadParam(m, iter, &p->site_specific_quirks_enabled) && | |
2127 ReadParam(m, iter, &p->shrinks_standalone_images_to_fit) && | |
2128 ReadParam(m, iter, &p->uses_universal_detector) && | |
2129 ReadParam(m, iter, &p->text_areas_are_resizable) && | |
2130 ReadParam(m, iter, &p->java_enabled) && | |
2131 ReadParam(m, iter, &p->allow_scripts_to_close_windows) && | |
2132 ReadParam(m, iter, &p->uses_page_cache) && | |
2133 ReadParam(m, iter, &p->remote_fonts_enabled) && | |
2134 ReadParam(m, iter, &p->javascript_can_access_clipboard) && | |
2135 ReadParam(m, iter, &p->xss_auditor_enabled) && | |
2136 ReadParam(m, iter, &p->local_storage_enabled) && | |
2137 ReadParam(m, iter, &p->databases_enabled) && | |
2138 ReadParam(m, iter, &p->application_cache_enabled) && | |
2139 ReadParam(m, iter, &p->tabs_to_links) && | |
2140 ReadParam(m, iter, &p->user_style_sheet_enabled) && | |
2141 ReadParam(m, iter, &p->user_style_sheet_location) && | |
2142 ReadParam(m, iter, &p->author_and_user_styles_enabled) && | |
2143 ReadParam(m, iter, &p->allow_universal_access_from_file_urls) && | |
2144 ReadParam(m, iter, &p->allow_file_access_from_file_urls) && | |
2145 ReadParam(m, iter, &p->experimental_webgl_enabled) && | |
2146 ReadParam(m, iter, &p->show_composited_layer_borders) && | |
2147 ReadParam(m, iter, &p->accelerated_compositing_enabled) && | |
2148 ReadParam(m, iter, &p->accelerated_2d_canvas_enabled) && | |
2149 ReadParam(m, iter, &p->memory_info_enabled); | |
2150 } | |
2151 static void Log(const param_type& p, std::wstring* l) { | |
2152 l->append(L"<WebPreferences>"); | |
2153 } | |
2154 }; | 1653 }; |
2155 | 1654 |
2156 // Traits for WebDropData | 1655 // Traits for WebDropData |
2157 template <> | 1656 template <> |
2158 struct ParamTraits<WebDropData> { | 1657 struct ParamTraits<WebDropData> { |
2159 typedef WebDropData param_type; | 1658 typedef WebDropData param_type; |
2160 static void Write(Message* m, const param_type& p) { | 1659 static void Write(Message* m, const param_type& p); |
2161 WriteParam(m, p.identity); | 1660 static bool Read(const Message* m, void** iter, param_type* p); |
2162 WriteParam(m, p.url); | 1661 static void Log(const param_type& p, std::wstring* l); |
2163 WriteParam(m, p.url_title); | |
2164 WriteParam(m, p.download_metadata); | |
2165 WriteParam(m, p.file_extension); | |
2166 WriteParam(m, p.filenames); | |
2167 WriteParam(m, p.plain_text); | |
2168 WriteParam(m, p.text_html); | |
2169 WriteParam(m, p.html_base_url); | |
2170 WriteParam(m, p.file_description_filename); | |
2171 WriteParam(m, p.file_contents); | |
2172 } | |
2173 static bool Read(const Message* m, void** iter, param_type* p) { | |
2174 return | |
2175 ReadParam(m, iter, &p->identity) && | |
2176 ReadParam(m, iter, &p->url) && | |
2177 ReadParam(m, iter, &p->url_title) && | |
2178 ReadParam(m, iter, &p->download_metadata) && | |
2179 ReadParam(m, iter, &p->file_extension) && | |
2180 ReadParam(m, iter, &p->filenames) && | |
2181 ReadParam(m, iter, &p->plain_text) && | |
2182 ReadParam(m, iter, &p->text_html) && | |
2183 ReadParam(m, iter, &p->html_base_url) && | |
2184 ReadParam(m, iter, &p->file_description_filename) && | |
2185 ReadParam(m, iter, &p->file_contents); | |
2186 } | |
2187 static void Log(const param_type& p, std::wstring* l) { | |
2188 l->append(L"<WebDropData>"); | |
2189 } | |
2190 }; | 1662 }; |
2191 | 1663 |
2192 // Traits for AudioManager::Format. | 1664 // Traits for AudioManager::Format. |
2193 template <> | 1665 template <> |
2194 struct ParamTraits<AudioManager::Format> { | 1666 struct ParamTraits<AudioManager::Format> { |
2195 typedef AudioManager::Format param_type; | 1667 typedef AudioManager::Format param_type; |
2196 static void Write(Message* m, const param_type& p) { | 1668 static void Write(Message* m, const param_type& p) { |
2197 m->WriteInt(p); | 1669 m->WriteInt(p); |
2198 } | 1670 } |
2199 static bool Read(const Message* m, void** iter, param_type* p) { | 1671 static bool Read(const Message* m, void** iter, param_type* p) { |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2585 | 2057 |
2586 template <> | 2058 template <> |
2587 struct SimilarTypeTraits<ViewType::Type> { | 2059 struct SimilarTypeTraits<ViewType::Type> { |
2588 typedef int Type; | 2060 typedef int Type; |
2589 }; | 2061 }; |
2590 | 2062 |
2591 // Traits for URLPattern. | 2063 // Traits for URLPattern. |
2592 template <> | 2064 template <> |
2593 struct ParamTraits<URLPattern> { | 2065 struct ParamTraits<URLPattern> { |
2594 typedef URLPattern param_type; | 2066 typedef URLPattern param_type; |
2595 static void Write(Message* m, const param_type& p) { | 2067 static void Write(Message* m, const param_type& p); |
2596 WriteParam(m, p.valid_schemes()); | 2068 static bool Read(const Message* m, void** iter, param_type* p); |
2597 WriteParam(m, p.GetAsString()); | 2069 static void Log(const param_type& p, std::wstring* l); |
2598 } | |
2599 static bool Read(const Message* m, void** iter, param_type* p) { | |
2600 int valid_schemes; | |
2601 std::string spec; | |
2602 if (!ReadParam(m, iter, &valid_schemes) || | |
2603 !ReadParam(m, iter, &spec)) | |
2604 return false; | |
2605 | |
2606 p->set_valid_schemes(valid_schemes); | |
2607 return p->Parse(spec); | |
2608 } | |
2609 static void Log(const param_type& p, std::wstring* l) { | |
2610 LogParam(p.GetAsString(), l); | |
2611 } | |
2612 }; | 2070 }; |
2613 | 2071 |
2614 template <> | 2072 template <> |
2615 struct ParamTraits<Clipboard::Buffer> { | 2073 struct ParamTraits<Clipboard::Buffer> { |
2616 typedef Clipboard::Buffer param_type; | 2074 typedef Clipboard::Buffer param_type; |
2617 static void Write(Message* m, const param_type& p) { | 2075 static void Write(Message* m, const param_type& p) { |
2618 m->WriteInt(p); | 2076 m->WriteInt(p); |
2619 } | 2077 } |
2620 static bool Read(const Message* m, void** iter, param_type* p) { | 2078 static bool Read(const Message* m, void** iter, param_type* p) { |
2621 int buffer; | 2079 int buffer; |
(...skipping 22 matching lines...) Expand all Loading... |
2644 } | 2102 } |
2645 | 2103 |
2646 LogParam(type, l); | 2104 LogParam(type, l); |
2647 } | 2105 } |
2648 }; | 2106 }; |
2649 | 2107 |
2650 // Traits for EditCommand structure. | 2108 // Traits for EditCommand structure. |
2651 template <> | 2109 template <> |
2652 struct ParamTraits<EditCommand> { | 2110 struct ParamTraits<EditCommand> { |
2653 typedef EditCommand param_type; | 2111 typedef EditCommand param_type; |
2654 static void Write(Message* m, const param_type& p) { | 2112 static void Write(Message* m, const param_type& p); |
2655 WriteParam(m, p.name); | 2113 static bool Read(const Message* m, void** iter, param_type* p); |
2656 WriteParam(m, p.value); | 2114 static void Log(const param_type& p, std::wstring* l); |
2657 } | |
2658 static bool Read(const Message* m, void** iter, param_type* p) { | |
2659 return ReadParam(m, iter, &p->name) && ReadParam(m, iter, &p->value); | |
2660 } | |
2661 static void Log(const param_type& p, std::wstring* l) { | |
2662 l->append(L"("); | |
2663 LogParam(p.name, l); | |
2664 l->append(L":"); | |
2665 LogParam(p.value, l); | |
2666 l->append(L")"); | |
2667 } | |
2668 }; | 2115 }; |
2669 | 2116 |
2670 // Traits for DOMStorageType enum. | 2117 // Traits for DOMStorageType enum. |
2671 template <> | 2118 template <> |
2672 struct ParamTraits<DOMStorageType> { | 2119 struct ParamTraits<DOMStorageType> { |
2673 typedef DOMStorageType param_type; | 2120 typedef DOMStorageType param_type; |
2674 static void Write(Message* m, const param_type& p) { | 2121 static void Write(Message* m, const param_type& p) { |
2675 m->WriteInt(p); | 2122 m->WriteInt(p); |
2676 } | 2123 } |
2677 static bool Read(const Message* m, void** iter, param_type* p) { | 2124 static bool Read(const Message* m, void** iter, param_type* p) { |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3005 l->append(L","); | 2452 l->append(L","); |
3006 LogParam(p.notification_id, l); | 2453 LogParam(p.notification_id, l); |
3007 l->append(L")"); | 2454 l->append(L")"); |
3008 } | 2455 } |
3009 }; | 2456 }; |
3010 | 2457 |
3011 // Traits for WebCookie | 2458 // Traits for WebCookie |
3012 template <> | 2459 template <> |
3013 struct ParamTraits<webkit_glue::WebCookie> { | 2460 struct ParamTraits<webkit_glue::WebCookie> { |
3014 typedef webkit_glue::WebCookie param_type; | 2461 typedef webkit_glue::WebCookie param_type; |
3015 static void Write(Message* m, const param_type& p) { | 2462 static void Write(Message* m, const param_type& p); |
3016 WriteParam(m, p.name); | 2463 static bool Read(const Message* m, void** iter, param_type* p); |
3017 WriteParam(m, p.value); | 2464 static void Log(const param_type& p, std::wstring* l); |
3018 WriteParam(m, p.domain); | |
3019 WriteParam(m, p.path); | |
3020 WriteParam(m, p.expires); | |
3021 WriteParam(m, p.http_only); | |
3022 WriteParam(m, p.secure); | |
3023 WriteParam(m, p.session); | |
3024 } | |
3025 static bool Read(const Message* m, void** iter, param_type* p) { | |
3026 return | |
3027 ReadParam(m, iter, &p->name) && | |
3028 ReadParam(m, iter, &p->value) && | |
3029 ReadParam(m, iter, &p->domain) && | |
3030 ReadParam(m, iter, &p->path) && | |
3031 ReadParam(m, iter, &p->expires) && | |
3032 ReadParam(m, iter, &p->http_only) && | |
3033 ReadParam(m, iter, &p->secure) && | |
3034 ReadParam(m, iter, &p->session); | |
3035 } | |
3036 static void Log(const param_type& p, std::wstring* l) { | |
3037 l->append(L"<WebCookie>"); | |
3038 } | |
3039 }; | 2465 }; |
3040 | 2466 |
3041 template<> | 2467 template<> |
3042 struct ParamTraits<ViewMsg_ExecuteCode_Params> { | 2468 struct ParamTraits<ViewMsg_ExecuteCode_Params> { |
3043 typedef ViewMsg_ExecuteCode_Params param_type; | 2469 typedef ViewMsg_ExecuteCode_Params param_type; |
3044 static void Write(Message* m, const param_type& p) { | 2470 static void Write(Message* m, const param_type& p) { |
3045 WriteParam(m, p.request_id); | 2471 WriteParam(m, p.request_id); |
3046 WriteParam(m, p.extension_id); | 2472 WriteParam(m, p.extension_id); |
3047 WriteParam(m, p.host_permissions); | 2473 WriteParam(m, p.host_permissions); |
3048 WriteParam(m, p.is_javascript); | 2474 WriteParam(m, p.is_javascript); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3176 LogParam(p.session_storage_namespace_id, l); | 2602 LogParam(p.session_storage_namespace_id, l); |
3177 l->append(L", "); | 2603 l->append(L", "); |
3178 LogParam(p.frame_name, l); | 2604 LogParam(p.frame_name, l); |
3179 l->append(L")"); | 2605 l->append(L")"); |
3180 } | 2606 } |
3181 }; | 2607 }; |
3182 | 2608 |
3183 template <> | 2609 template <> |
3184 struct ParamTraits<ExtensionExtent> { | 2610 struct ParamTraits<ExtensionExtent> { |
3185 typedef ExtensionExtent param_type; | 2611 typedef ExtensionExtent param_type; |
3186 static void Write(Message* m, const param_type& p) { | 2612 static void Write(Message* m, const param_type& p); |
3187 WriteParam(m, p.patterns()); | 2613 static bool Read(const Message* m, void** iter, param_type* p); |
3188 } | 2614 static void Log(const param_type& p, std::wstring* l); |
3189 static bool Read(const Message* m, void** iter, param_type* p) { | |
3190 std::vector<URLPattern> patterns; | |
3191 bool success = | |
3192 ReadParam(m, iter, &patterns); | |
3193 if (!success) | |
3194 return false; | |
3195 | |
3196 for (size_t i = 0; i < patterns.size(); ++i) | |
3197 p->AddPattern(patterns[i]); | |
3198 return true; | |
3199 } | |
3200 static void Log(const param_type& p, std::wstring* l) { | |
3201 LogParam(p.patterns(), l); | |
3202 } | |
3203 }; | 2615 }; |
3204 | 2616 |
3205 template <> | 2617 template <> |
3206 struct ParamTraits<ViewMsg_ExtensionExtentInfo> { | 2618 struct ParamTraits<ViewMsg_ExtensionExtentInfo> { |
3207 typedef ViewMsg_ExtensionExtentInfo param_type; | 2619 typedef ViewMsg_ExtensionExtentInfo param_type; |
3208 static void Write(Message* m, const param_type& p) { | 2620 static void Write(Message* m, const param_type& p) { |
3209 WriteParam(m, p.extension_id); | 2621 WriteParam(m, p.extension_id); |
3210 WriteParam(m, p.web_extent); | 2622 WriteParam(m, p.web_extent); |
3211 WriteParam(m, p.browse_extent); | 2623 WriteParam(m, p.browse_extent); |
3212 } | 2624 } |
(...skipping 17 matching lines...) Expand all Loading... |
3230 return ReadParam(m, iter, &p->extension_apps); | 2642 return ReadParam(m, iter, &p->extension_apps); |
3231 } | 2643 } |
3232 static void Log(const param_type& p, std::wstring* l) { | 2644 static void Log(const param_type& p, std::wstring* l) { |
3233 LogParam(p.extension_apps, l); | 2645 LogParam(p.extension_apps, l); |
3234 } | 2646 } |
3235 }; | 2647 }; |
3236 | 2648 |
3237 template<> | 2649 template<> |
3238 struct ParamTraits<appcache::AppCacheResourceInfo> { | 2650 struct ParamTraits<appcache::AppCacheResourceInfo> { |
3239 typedef appcache::AppCacheResourceInfo param_type; | 2651 typedef appcache::AppCacheResourceInfo param_type; |
3240 static void Write(Message* m, const param_type& p) { | 2652 static void Write(Message* m, const param_type& p); |
3241 WriteParam(m, p.url); | 2653 static bool Read(const Message* m, void** iter, param_type* p); |
3242 WriteParam(m, p.size); | 2654 static void Log(const param_type& p, std::wstring* l); |
3243 WriteParam(m, p.is_manifest); | |
3244 WriteParam(m, p.is_master); | |
3245 WriteParam(m, p.is_fallback); | |
3246 WriteParam(m, p.is_foreign); | |
3247 WriteParam(m, p.is_explicit); | |
3248 } | |
3249 static bool Read(const Message* m, void** iter, param_type* p) { | |
3250 return ReadParam(m, iter, &p->url) && | |
3251 ReadParam(m, iter, &p->size) && | |
3252 ReadParam(m, iter, &p->is_manifest) && | |
3253 ReadParam(m, iter, &p->is_master) && | |
3254 ReadParam(m, iter, &p->is_fallback) && | |
3255 ReadParam(m, iter, &p->is_foreign) && | |
3256 ReadParam(m, iter, &p->is_explicit); | |
3257 } | |
3258 static void Log(const param_type& p, std::wstring* l) { | |
3259 l->append(L"("); | |
3260 LogParam(p.url, l); | |
3261 l->append(L", "); | |
3262 LogParam(p.size, l); | |
3263 l->append(L", "); | |
3264 LogParam(p.is_manifest, l); | |
3265 l->append(L", "); | |
3266 LogParam(p.is_master, l); | |
3267 l->append(L", "); | |
3268 LogParam(p.is_fallback, l); | |
3269 l->append(L", "); | |
3270 LogParam(p.is_foreign, l); | |
3271 l->append(L", "); | |
3272 LogParam(p.is_explicit, l); | |
3273 l->append(L")"); | |
3274 } | |
3275 }; | 2655 }; |
3276 | 2656 |
3277 template <> | 2657 template <> |
3278 struct ParamTraits<appcache::AppCacheInfo> { | 2658 struct ParamTraits<appcache::AppCacheInfo> { |
3279 typedef appcache::AppCacheInfo param_type; | 2659 typedef appcache::AppCacheInfo param_type; |
3280 static void Write(Message* m, const param_type& p) { | 2660 static void Write(Message* m, const param_type& p); |
3281 WriteParam(m, p.manifest_url); | 2661 static bool Read(const Message* m, void** iter, param_type* p); |
3282 WriteParam(m, p.creation_time); | 2662 static void Log(const param_type& p, std::wstring* l); |
3283 WriteParam(m, p.last_update_time); | 2663 }; |
3284 WriteParam(m, p.last_access_time); | |
3285 WriteParam(m, p.cache_id); | |
3286 WriteParam(m, p.status); | |
3287 WriteParam(m, p.size); | |
3288 WriteParam(m, p.is_complete); | |
3289 } | |
3290 static bool Read(const Message* m, void** iter, param_type* p) { | |
3291 return ReadParam(m, iter, &p->manifest_url) && | |
3292 ReadParam(m, iter, &p->creation_time) && | |
3293 ReadParam(m, iter, &p->last_update_time) && | |
3294 ReadParam(m, iter, &p->last_access_time) && | |
3295 ReadParam(m, iter, &p->cache_id) && | |
3296 ReadParam(m, iter, &p->status) && | |
3297 ReadParam(m, iter, &p->size) && | |
3298 ReadParam(m, iter, &p->is_complete); | |
3299 } | |
3300 static void Log(const param_type& p, std::wstring* l) { | |
3301 l->append(L"("); | |
3302 LogParam(p.manifest_url, l); | |
3303 l->append(L", "); | |
3304 LogParam(p.creation_time, l); | |
3305 l->append(L", "); | |
3306 LogParam(p.last_update_time, l); | |
3307 l->append(L", "); | |
3308 LogParam(p.last_access_time, l); | |
3309 l->append(L", "); | |
3310 LogParam(p.cache_id, l); | |
3311 l->append(L", "); | |
3312 LogParam(p.status, l); | |
3313 l->append(L", "); | |
3314 LogParam(p.size, l); | |
3315 l->append(L")"); | |
3316 LogParam(p.is_complete, l); | |
3317 l->append(L", "); | |
3318 } | |
3319 }; | |
3320 | 2664 |
3321 template <> | 2665 template <> |
3322 struct ParamTraits<WindowContainerType> { | 2666 struct ParamTraits<WindowContainerType> { |
3323 typedef WindowContainerType param_type; | 2667 typedef WindowContainerType param_type; |
3324 static void Write(Message* m, const param_type& p) { | 2668 static void Write(Message* m, const param_type& p) { |
3325 int val = static_cast<int>(p); | 2669 int val = static_cast<int>(p); |
3326 WriteParam(m, val); | 2670 WriteParam(m, val); |
3327 } | 2671 } |
3328 static bool Read(const Message* m, void** iter, param_type* p) { | 2672 static bool Read(const Message* m, void** iter, param_type* p) { |
3329 int val = 0; | 2673 int val = 0; |
3330 if (!ReadParam(m, iter, &val) || | 2674 if (!ReadParam(m, iter, &val) || |
3331 val < WINDOW_CONTAINER_TYPE_NORMAL || | 2675 val < WINDOW_CONTAINER_TYPE_NORMAL || |
3332 val >= WINDOW_CONTAINER_TYPE_MAX_VALUE) | 2676 val >= WINDOW_CONTAINER_TYPE_MAX_VALUE) |
3333 return false; | 2677 return false; |
3334 *p = static_cast<param_type>(val); | 2678 *p = static_cast<param_type>(val); |
3335 return true; | 2679 return true; |
3336 } | 2680 } |
3337 static void Log(const param_type& p, std::wstring* l) { | 2681 static void Log(const param_type& p, std::wstring* l) { |
3338 LogParam(p, l); | 2682 ParamTraits<int>::Log(static_cast<int>(p), l); |
3339 } | 2683 } |
3340 }; | 2684 }; |
3341 | 2685 |
3342 template <> | 2686 template <> |
3343 struct ParamTraits<webkit_glue::WebAccessibility> { | 2687 struct ParamTraits<webkit_glue::WebAccessibility> { |
3344 typedef webkit_glue::WebAccessibility param_type; | 2688 typedef webkit_glue::WebAccessibility param_type; |
3345 static void Write(Message* m, const param_type& p) { | 2689 static void Write(Message* m, const param_type& p); |
3346 WriteParam(m, p.id); | 2690 static bool Read(const Message* m, void** iter, param_type* p); |
3347 WriteParam(m, p.name); | 2691 static void Log(const param_type& p, std::wstring* l); |
3348 WriteParam(m, p.value); | |
3349 WriteParam(m, static_cast<int>(p.role)); | |
3350 WriteParam(m, static_cast<int>(p.state)); | |
3351 WriteParam(m, p.location); | |
3352 WriteParam(m, p.attributes); | |
3353 WriteParam(m, p.children); | |
3354 } | |
3355 static bool Read(const Message* m, void** iter, param_type* p) { | |
3356 bool ret = ReadParam(m, iter, &p->id); | |
3357 ret = ret && ReadParam(m, iter, &p->name); | |
3358 ret = ret && ReadParam(m, iter, &p->value); | |
3359 int role = -1; | |
3360 ret = ret && ReadParam(m, iter, &role); | |
3361 if (role >= webkit_glue::WebAccessibility::ROLE_NONE && | |
3362 role < webkit_glue::WebAccessibility::NUM_ROLES) { | |
3363 p->role = static_cast<webkit_glue::WebAccessibility::Role>(role); | |
3364 } else { | |
3365 p->role = webkit_glue::WebAccessibility::ROLE_NONE; | |
3366 } | |
3367 int state = 0; | |
3368 ret = ret && ReadParam(m, iter, &state); | |
3369 p->state = static_cast<webkit_glue::WebAccessibility::State>(state); | |
3370 ret = ret && ReadParam(m, iter, &p->location); | |
3371 ret = ret && ReadParam(m, iter, &p->attributes); | |
3372 ret = ret && ReadParam(m, iter, &p->children); | |
3373 return ret; | |
3374 } | |
3375 static void Log(const param_type& p, std::wstring* l) { | |
3376 l->append(L"("); | |
3377 LogParam(p.id, l); | |
3378 l->append(L", "); | |
3379 LogParam(p.name, l); | |
3380 l->append(L", "); | |
3381 LogParam(p.value, l); | |
3382 l->append(L", "); | |
3383 LogParam(static_cast<int>(p.role), l); | |
3384 l->append(L", "); | |
3385 LogParam(static_cast<int>(p.state), l); | |
3386 l->append(L", "); | |
3387 LogParam(p.location, l); | |
3388 l->append(L", "); | |
3389 LogParam(p.attributes, l); | |
3390 l->append(L", "); | |
3391 LogParam(p.children, l); | |
3392 l->append(L")"); | |
3393 } | |
3394 }; | 2692 }; |
3395 | 2693 |
3396 // Traits for ViewMsg_DeviceOrientationUpdated_Params | 2694 // Traits for ViewMsg_DeviceOrientationUpdated_Params |
3397 // structure to pack/unpack. | 2695 // structure to pack/unpack. |
3398 template <> | 2696 template <> |
3399 struct ParamTraits<ViewMsg_DeviceOrientationUpdated_Params> { | 2697 struct ParamTraits<ViewMsg_DeviceOrientationUpdated_Params> { |
3400 typedef ViewMsg_DeviceOrientationUpdated_Params param_type; | 2698 typedef ViewMsg_DeviceOrientationUpdated_Params param_type; |
3401 static void Write(Message* m, const param_type& p) { | 2699 static void Write(Message* m, const param_type& p) { |
3402 WriteParam(m, p.can_provide_alpha); | 2700 WriteParam(m, p.can_provide_alpha); |
3403 WriteParam(m, p.alpha); | 2701 WriteParam(m, p.alpha); |
(...skipping 26 matching lines...) Expand all Loading... |
3430 LogParam(p.gamma, l); | 2728 LogParam(p.gamma, l); |
3431 l->append(L")"); | 2729 l->append(L")"); |
3432 } | 2730 } |
3433 }; | 2731 }; |
3434 } // namespace IPC | 2732 } // namespace IPC |
3435 | 2733 |
3436 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2734 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
3437 #include "ipc/ipc_message_macros.h" | 2735 #include "ipc/ipc_message_macros.h" |
3438 | 2736 |
3439 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2737 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |