| 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" | |
| 10 #include "chrome/common/render_messages.h" | 9 #include "chrome/common/render_messages.h" |
| 11 #include "net/base/upload_data.h" | 10 #include "net/base/upload_data.h" |
| 12 | 11 |
| 13 ViewMsg_Navigate_Params::ViewMsg_Navigate_Params() | 12 ViewMsg_Navigate_Params::ViewMsg_Navigate_Params() |
| 14 : page_id(-1), | 13 : page_id(-1), |
| 15 pending_history_list_offset(-1), | 14 pending_history_list_offset(-1), |
| 16 current_history_list_offset(-1), | 15 current_history_list_offset(-1), |
| 17 current_history_list_length(0), | 16 current_history_list_length(0), |
| 18 transition(PageTransition::LINK), | 17 transition(PageTransition::LINK), |
| 19 navigation_type(NORMAL) { | 18 navigation_type(NORMAL) { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 ViewHostMsg_ScriptedPrint_Params::~ViewHostMsg_ScriptedPrint_Params() { | 165 ViewHostMsg_ScriptedPrint_Params::~ViewHostMsg_ScriptedPrint_Params() { |
| 167 } | 166 } |
| 168 | 167 |
| 169 ViewMsg_DOMStorageEvent_Params::ViewMsg_DOMStorageEvent_Params() | 168 ViewMsg_DOMStorageEvent_Params::ViewMsg_DOMStorageEvent_Params() |
| 170 : storage_type_(DOM_STORAGE_LOCAL) { | 169 : storage_type_(DOM_STORAGE_LOCAL) { |
| 171 } | 170 } |
| 172 | 171 |
| 173 ViewMsg_DOMStorageEvent_Params::~ViewMsg_DOMStorageEvent_Params() { | 172 ViewMsg_DOMStorageEvent_Params::~ViewMsg_DOMStorageEvent_Params() { |
| 174 } | 173 } |
| 175 | 174 |
| 176 ViewHostMsg_IDBFactoryOpen_Params::ViewHostMsg_IDBFactoryOpen_Params() | |
| 177 : routing_id_(0), | |
| 178 response_id_(0), | |
| 179 maximum_size_(0) { | |
| 180 } | |
| 181 | |
| 182 ViewHostMsg_IDBFactoryOpen_Params::~ViewHostMsg_IDBFactoryOpen_Params() { | |
| 183 } | |
| 184 | |
| 185 ViewHostMsg_IDBDatabaseCreateObjectStore_Params:: | |
| 186 ViewHostMsg_IDBDatabaseCreateObjectStore_Params() | |
| 187 : auto_increment_(false), | |
| 188 transaction_id_(0), | |
| 189 idb_database_id_(0) { | |
| 190 } | |
| 191 | |
| 192 ViewHostMsg_IDBDatabaseCreateObjectStore_Params:: | |
| 193 ~ViewHostMsg_IDBDatabaseCreateObjectStore_Params() { | |
| 194 } | |
| 195 | |
| 196 ViewHostMsg_IDBIndexOpenCursor_Params::ViewHostMsg_IDBIndexOpenCursor_Params() | |
| 197 : response_id_(0), | |
| 198 lower_open_(false), | |
| 199 upper_open_(false), | |
| 200 direction_(0), | |
| 201 idb_index_id_(0), | |
| 202 transaction_id_(0) { | |
| 203 } | |
| 204 | |
| 205 ViewHostMsg_IDBIndexOpenCursor_Params:: | |
| 206 ~ViewHostMsg_IDBIndexOpenCursor_Params() { | |
| 207 } | |
| 208 | |
| 209 | |
| 210 ViewHostMsg_IDBObjectStorePut_Params::ViewHostMsg_IDBObjectStorePut_Params() | |
| 211 : idb_object_store_id_(0), | |
| 212 response_id_(0), | |
| 213 add_only_(false), | |
| 214 transaction_id_(0) { | |
| 215 } | |
| 216 | |
| 217 ViewHostMsg_IDBObjectStorePut_Params::~ViewHostMsg_IDBObjectStorePut_Params() { | |
| 218 } | |
| 219 | |
| 220 ViewHostMsg_IDBObjectStoreCreateIndex_Params:: | |
| 221 ViewHostMsg_IDBObjectStoreCreateIndex_Params() | |
| 222 : unique_(false), | |
| 223 transaction_id_(0), | |
| 224 idb_object_store_id_(0) { | |
| 225 } | |
| 226 | |
| 227 ViewHostMsg_IDBObjectStoreCreateIndex_Params:: | |
| 228 ~ViewHostMsg_IDBObjectStoreCreateIndex_Params() { | |
| 229 } | |
| 230 | |
| 231 | |
| 232 ViewHostMsg_IDBObjectStoreOpenCursor_Params:: | |
| 233 ViewHostMsg_IDBObjectStoreOpenCursor_Params() | |
| 234 : response_id_(0), | |
| 235 lower_open_(false), | |
| 236 upper_open_(false), | |
| 237 direction_(0), | |
| 238 idb_object_store_id_(0), | |
| 239 transaction_id_(0) { | |
| 240 } | |
| 241 | |
| 242 ViewHostMsg_IDBObjectStoreOpenCursor_Params:: | |
| 243 ~ViewHostMsg_IDBObjectStoreOpenCursor_Params() { | |
| 244 } | |
| 245 | |
| 246 ViewMsg_ExecuteCode_Params::ViewMsg_ExecuteCode_Params() { | 175 ViewMsg_ExecuteCode_Params::ViewMsg_ExecuteCode_Params() { |
| 247 } | 176 } |
| 248 | 177 |
| 249 ViewMsg_ExecuteCode_Params::ViewMsg_ExecuteCode_Params( | 178 ViewMsg_ExecuteCode_Params::ViewMsg_ExecuteCode_Params( |
| 250 int request_id, | 179 int request_id, |
| 251 const std::string& extension_id, | 180 const std::string& extension_id, |
| 252 bool is_javascript, | 181 bool is_javascript, |
| 253 const std::string& code, | 182 const std::string& code, |
| 254 bool all_frames) | 183 bool all_frames) |
| 255 : request_id(request_id), extension_id(extension_id), | 184 : request_id(request_id), extension_id(extension_id), |
| (...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 LogParam(p.new_value_, l); | 1179 LogParam(p.new_value_, l); |
| 1251 l->append(", "); | 1180 l->append(", "); |
| 1252 LogParam(p.origin_, l); | 1181 LogParam(p.origin_, l); |
| 1253 l->append(", "); | 1182 l->append(", "); |
| 1254 LogParam(p.url_, l); | 1183 LogParam(p.url_, l); |
| 1255 l->append(", "); | 1184 l->append(", "); |
| 1256 LogParam(p.storage_type_, l); | 1185 LogParam(p.storage_type_, l); |
| 1257 l->append(")"); | 1186 l->append(")"); |
| 1258 } | 1187 } |
| 1259 | 1188 |
| 1260 void ParamTraits<ViewHostMsg_IDBFactoryOpen_Params>::Write( | |
| 1261 Message* m, | |
| 1262 const param_type& p) { | |
| 1263 WriteParam(m, p.routing_id_); | |
| 1264 WriteParam(m, p.response_id_); | |
| 1265 WriteParam(m, p.origin_); | |
| 1266 WriteParam(m, p.name_); | |
| 1267 WriteParam(m, p.maximum_size_); | |
| 1268 } | |
| 1269 | |
| 1270 bool ParamTraits<ViewHostMsg_IDBFactoryOpen_Params>::Read(const Message* m, | |
| 1271 void** iter, | |
| 1272 param_type* p) { | |
| 1273 return | |
| 1274 ReadParam(m, iter, &p->routing_id_) && | |
| 1275 ReadParam(m, iter, &p->response_id_) && | |
| 1276 ReadParam(m, iter, &p->origin_) && | |
| 1277 ReadParam(m, iter, &p->name_) && | |
| 1278 ReadParam(m, iter, &p->maximum_size_); | |
| 1279 } | |
| 1280 | |
| 1281 void ParamTraits<ViewHostMsg_IDBFactoryOpen_Params>::Log(const param_type& p, | |
| 1282 std::string* l) { | |
| 1283 l->append("("); | |
| 1284 LogParam(p.routing_id_, l); | |
| 1285 l->append(", "); | |
| 1286 LogParam(p.response_id_, l); | |
| 1287 l->append(", "); | |
| 1288 LogParam(p.origin_, l); | |
| 1289 l->append(", "); | |
| 1290 LogParam(p.name_, l); | |
| 1291 l->append(", "); | |
| 1292 LogParam(p.maximum_size_, l); | |
| 1293 l->append(")"); | |
| 1294 } | |
| 1295 | |
| 1296 void ParamTraits<ViewHostMsg_IDBDatabaseCreateObjectStore_Params>::Write( | |
| 1297 Message* m, | |
| 1298 const param_type& p) { | |
| 1299 WriteParam(m, p.name_); | |
| 1300 WriteParam(m, p.key_path_); | |
| 1301 WriteParam(m, p.auto_increment_); | |
| 1302 WriteParam(m, p.transaction_id_); | |
| 1303 WriteParam(m, p.idb_database_id_); | |
| 1304 } | |
| 1305 | |
| 1306 bool ParamTraits<ViewHostMsg_IDBDatabaseCreateObjectStore_Params>::Read( | |
| 1307 const Message* m, | |
| 1308 void** iter, | |
| 1309 param_type* p) { | |
| 1310 return | |
| 1311 ReadParam(m, iter, &p->name_) && | |
| 1312 ReadParam(m, iter, &p->key_path_) && | |
| 1313 ReadParam(m, iter, &p->auto_increment_) && | |
| 1314 ReadParam(m, iter, &p->transaction_id_) && | |
| 1315 ReadParam(m, iter, &p->idb_database_id_); | |
| 1316 } | |
| 1317 | |
| 1318 void ParamTraits<ViewHostMsg_IDBDatabaseCreateObjectStore_Params>::Log( | |
| 1319 const param_type& p, | |
| 1320 std::string* l) { | |
| 1321 l->append("("); | |
| 1322 LogParam(p.name_, l); | |
| 1323 l->append(", "); | |
| 1324 LogParam(p.key_path_, l); | |
| 1325 l->append(", "); | |
| 1326 LogParam(p.auto_increment_, l); | |
| 1327 l->append(", "); | |
| 1328 LogParam(p.transaction_id_, l); | |
| 1329 l->append(", "); | |
| 1330 LogParam(p.idb_database_id_, l); | |
| 1331 l->append(")"); | |
| 1332 } | |
| 1333 | |
| 1334 void ParamTraits<ViewHostMsg_IDBIndexOpenCursor_Params>::Write( | |
| 1335 Message* m, | |
| 1336 const param_type& p) { | |
| 1337 WriteParam(m, p.response_id_); | |
| 1338 WriteParam(m, p.lower_key_); | |
| 1339 WriteParam(m, p.upper_key_); | |
| 1340 WriteParam(m, p.lower_open_); | |
| 1341 WriteParam(m, p.upper_open_); | |
| 1342 WriteParam(m, p.direction_); | |
| 1343 WriteParam(m, p.idb_index_id_); | |
| 1344 WriteParam(m, p.transaction_id_); | |
| 1345 } | |
| 1346 | |
| 1347 bool ParamTraits<ViewHostMsg_IDBIndexOpenCursor_Params>::Read( | |
| 1348 const Message* m, | |
| 1349 void** iter, | |
| 1350 param_type* p) { | |
| 1351 return | |
| 1352 ReadParam(m, iter, &p->response_id_) && | |
| 1353 ReadParam(m, iter, &p->lower_key_) && | |
| 1354 ReadParam(m, iter, &p->upper_key_) && | |
| 1355 ReadParam(m, iter, &p->lower_open_) && | |
| 1356 ReadParam(m, iter, &p->upper_open_) && | |
| 1357 ReadParam(m, iter, &p->direction_) && | |
| 1358 ReadParam(m, iter, &p->idb_index_id_) && | |
| 1359 ReadParam(m, iter, &p->transaction_id_); | |
| 1360 } | |
| 1361 | |
| 1362 void ParamTraits<ViewHostMsg_IDBIndexOpenCursor_Params>::Log( | |
| 1363 const param_type& p, | |
| 1364 std::string* l) { | |
| 1365 l->append("("); | |
| 1366 LogParam(p.response_id_, l); | |
| 1367 l->append(", "); | |
| 1368 LogParam(p.lower_key_, l); | |
| 1369 l->append(", "); | |
| 1370 LogParam(p.upper_key_, l); | |
| 1371 l->append(", "); | |
| 1372 LogParam(p.lower_open_, l); | |
| 1373 l->append(", "); | |
| 1374 LogParam(p.upper_open_, l); | |
| 1375 l->append(", "); | |
| 1376 LogParam(p.direction_, l); | |
| 1377 l->append(", "); | |
| 1378 LogParam(p.idb_index_id_, l); | |
| 1379 l->append(","); | |
| 1380 LogParam(p.transaction_id_, l); | |
| 1381 l->append(")"); | |
| 1382 } | |
| 1383 | |
| 1384 void ParamTraits<ViewHostMsg_IDBObjectStorePut_Params>::Write( | |
| 1385 Message* m, | |
| 1386 const param_type& p) { | |
| 1387 WriteParam(m, p.idb_object_store_id_); | |
| 1388 WriteParam(m, p.response_id_); | |
| 1389 WriteParam(m, p.serialized_value_); | |
| 1390 WriteParam(m, p.key_); | |
| 1391 WriteParam(m, p.add_only_); | |
| 1392 WriteParam(m, p.transaction_id_); | |
| 1393 } | |
| 1394 | |
| 1395 bool ParamTraits<ViewHostMsg_IDBObjectStorePut_Params>::Read( | |
| 1396 const Message* m, | |
| 1397 void** iter, | |
| 1398 param_type* p) { | |
| 1399 return | |
| 1400 ReadParam(m, iter, &p->idb_object_store_id_) && | |
| 1401 ReadParam(m, iter, &p->response_id_) && | |
| 1402 ReadParam(m, iter, &p->serialized_value_) && | |
| 1403 ReadParam(m, iter, &p->key_) && | |
| 1404 ReadParam(m, iter, &p->add_only_) && | |
| 1405 ReadParam(m, iter, &p->transaction_id_); | |
| 1406 } | |
| 1407 | |
| 1408 void ParamTraits<ViewHostMsg_IDBObjectStorePut_Params>::Log( | |
| 1409 const param_type& p, | |
| 1410 std::string* l) { | |
| 1411 l->append("("); | |
| 1412 LogParam(p.idb_object_store_id_, l); | |
| 1413 l->append(", "); | |
| 1414 LogParam(p.response_id_, l); | |
| 1415 l->append(", "); | |
| 1416 LogParam(p.serialized_value_, l); | |
| 1417 l->append(", "); | |
| 1418 LogParam(p.key_, l); | |
| 1419 l->append(", "); | |
| 1420 LogParam(p.add_only_, l); | |
| 1421 l->append(", "); | |
| 1422 LogParam(p.transaction_id_, l); | |
| 1423 l->append(")"); | |
| 1424 } | |
| 1425 | |
| 1426 void ParamTraits<ViewHostMsg_IDBObjectStoreCreateIndex_Params>::Write( | |
| 1427 Message* m, | |
| 1428 const param_type& p) { | |
| 1429 WriteParam(m, p.name_); | |
| 1430 WriteParam(m, p.key_path_); | |
| 1431 WriteParam(m, p.unique_); | |
| 1432 WriteParam(m, p.transaction_id_); | |
| 1433 WriteParam(m, p.idb_object_store_id_); | |
| 1434 } | |
| 1435 | |
| 1436 bool ParamTraits<ViewHostMsg_IDBObjectStoreCreateIndex_Params>::Read( | |
| 1437 const Message* m, | |
| 1438 void** iter, | |
| 1439 param_type* p) { | |
| 1440 return | |
| 1441 ReadParam(m, iter, &p->name_) && | |
| 1442 ReadParam(m, iter, &p->key_path_) && | |
| 1443 ReadParam(m, iter, &p->unique_) && | |
| 1444 ReadParam(m, iter, &p->transaction_id_) && | |
| 1445 ReadParam(m, iter, &p->idb_object_store_id_); | |
| 1446 } | |
| 1447 | |
| 1448 void ParamTraits<ViewHostMsg_IDBObjectStoreCreateIndex_Params>::Log( | |
| 1449 const param_type& p, | |
| 1450 std::string* l) { | |
| 1451 l->append("("); | |
| 1452 LogParam(p.name_, l); | |
| 1453 l->append(", "); | |
| 1454 LogParam(p.key_path_, l); | |
| 1455 l->append(", "); | |
| 1456 LogParam(p.unique_, l); | |
| 1457 l->append(", "); | |
| 1458 LogParam(p.transaction_id_, l); | |
| 1459 l->append(", "); | |
| 1460 LogParam(p.idb_object_store_id_, l); | |
| 1461 l->append(")"); | |
| 1462 } | |
| 1463 | |
| 1464 void ParamTraits<ViewHostMsg_IDBObjectStoreOpenCursor_Params>::Write( | |
| 1465 Message* m, | |
| 1466 const param_type& p) { | |
| 1467 WriteParam(m, p.response_id_); | |
| 1468 WriteParam(m, p.lower_key_); | |
| 1469 WriteParam(m, p.upper_key_); | |
| 1470 WriteParam(m, p.lower_open_); | |
| 1471 WriteParam(m, p.upper_open_); | |
| 1472 WriteParam(m, p.direction_); | |
| 1473 WriteParam(m, p.idb_object_store_id_); | |
| 1474 WriteParam(m, p.transaction_id_); | |
| 1475 } | |
| 1476 | |
| 1477 bool ParamTraits<ViewHostMsg_IDBObjectStoreOpenCursor_Params>::Read( | |
| 1478 const Message* m, | |
| 1479 void** iter, | |
| 1480 param_type* p) { | |
| 1481 return | |
| 1482 ReadParam(m, iter, &p->response_id_) && | |
| 1483 ReadParam(m, iter, &p->lower_key_) && | |
| 1484 ReadParam(m, iter, &p->upper_key_) && | |
| 1485 ReadParam(m, iter, &p->lower_open_) && | |
| 1486 ReadParam(m, iter, &p->upper_open_) && | |
| 1487 ReadParam(m, iter, &p->direction_) && | |
| 1488 ReadParam(m, iter, &p->idb_object_store_id_) && | |
| 1489 ReadParam(m, iter, &p->transaction_id_); | |
| 1490 } | |
| 1491 | |
| 1492 void ParamTraits<ViewHostMsg_IDBObjectStoreOpenCursor_Params>::Log( | |
| 1493 const param_type& p, | |
| 1494 std::string* l) { | |
| 1495 l->append("("); | |
| 1496 LogParam(p.response_id_, l); | |
| 1497 l->append(", "); | |
| 1498 LogParam(p.lower_key_, l); | |
| 1499 l->append(", "); | |
| 1500 LogParam(p.upper_key_, l); | |
| 1501 l->append(", "); | |
| 1502 LogParam(p.lower_open_, l); | |
| 1503 l->append(", "); | |
| 1504 LogParam(p.upper_open_, l); | |
| 1505 l->append(", "); | |
| 1506 LogParam(p.direction_, l); | |
| 1507 l->append(", "); | |
| 1508 LogParam(p.idb_object_store_id_, l); | |
| 1509 l->append(","); | |
| 1510 LogParam(p.transaction_id_, l); | |
| 1511 l->append(")"); | |
| 1512 } | |
| 1513 | |
| 1514 void ParamTraits<ViewMsg_ExecuteCode_Params>::Write(Message* m, | 1189 void ParamTraits<ViewMsg_ExecuteCode_Params>::Write(Message* m, |
| 1515 const param_type& p) { | 1190 const param_type& p) { |
| 1516 WriteParam(m, p.request_id); | 1191 WriteParam(m, p.request_id); |
| 1517 WriteParam(m, p.extension_id); | 1192 WriteParam(m, p.extension_id); |
| 1518 WriteParam(m, p.is_javascript); | 1193 WriteParam(m, p.is_javascript); |
| 1519 WriteParam(m, p.code); | 1194 WriteParam(m, p.code); |
| 1520 WriteParam(m, p.all_frames); | 1195 WriteParam(m, p.all_frames); |
| 1521 } | 1196 } |
| 1522 | 1197 |
| 1523 bool ParamTraits<ViewMsg_ExecuteCode_Params>::Read(const Message* m, | 1198 bool ParamTraits<ViewMsg_ExecuteCode_Params>::Read(const Message* m, |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1937 const param_type& p, | 1612 const param_type& p, |
| 1938 std::string* l) { | 1613 std::string* l) { |
| 1939 l->append("("); | 1614 l->append("("); |
| 1940 LogParam(p.notification_type, l); | 1615 LogParam(p.notification_type, l); |
| 1941 l->append(", "); | 1616 l->append(", "); |
| 1942 LogParam(p.acc_obj, l); | 1617 LogParam(p.acc_obj, l); |
| 1943 l->append(")"); | 1618 l->append(")"); |
| 1944 } | 1619 } |
| 1945 | 1620 |
| 1946 } // namespace IPC | 1621 } // namespace IPC |
| OLD | NEW |