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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 // The origin doing the initiating. | 536 // The origin doing the initiating. |
537 string16 origin_; | 537 string16 origin_; |
538 | 538 |
539 // The name of the database. | 539 // The name of the database. |
540 string16 name_; | 540 string16 name_; |
541 | 541 |
542 // The description of the database. | 542 // The description of the database. |
543 string16 description_; | 543 string16 description_; |
544 }; | 544 }; |
545 | 545 |
| 546 // Used to create an object store. |
| 547 struct ViewHostMsg_IDBDatabaseCreateObjectStore_Params { |
| 548 // The response should have this id. |
| 549 int32 response_id_; |
| 550 |
| 551 // The name of the object store. |
| 552 string16 name_; |
| 553 |
| 554 // The keyPath of the object store. |
| 555 string16 keypath_; |
| 556 |
| 557 // Whether the object store created should have a key generator. |
| 558 bool auto_increment_; |
| 559 |
| 560 // The database the object store belongs to. |
| 561 int32 idb_database_id_; |
| 562 }; |
| 563 |
546 // Allows an extension to execute code in a tab. | 564 // Allows an extension to execute code in a tab. |
547 struct ViewMsg_ExecuteCode_Params { | 565 struct ViewMsg_ExecuteCode_Params { |
548 ViewMsg_ExecuteCode_Params() {} | 566 ViewMsg_ExecuteCode_Params() {} |
549 ViewMsg_ExecuteCode_Params(int request_id, const std::string& extension_id, | 567 ViewMsg_ExecuteCode_Params(int request_id, const std::string& extension_id, |
550 const std::vector<URLPattern>& host_permissions, | 568 const std::vector<URLPattern>& host_permissions, |
551 bool is_javascript, const std::string& code, | 569 bool is_javascript, const std::string& code, |
552 bool all_frames) | 570 bool all_frames) |
553 : request_id(request_id), extension_id(extension_id), | 571 : request_id(request_id), extension_id(extension_id), |
554 host_permissions(host_permissions), is_javascript(is_javascript), | 572 host_permissions(host_permissions), is_javascript(is_javascript), |
555 code(code), all_frames(all_frames) { | 573 code(code), all_frames(all_frames) { |
(...skipping 1792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2348 l->append(L", "); | 2366 l->append(L", "); |
2349 LogParam(p.origin_, l); | 2367 LogParam(p.origin_, l); |
2350 l->append(L", "); | 2368 l->append(L", "); |
2351 LogParam(p.name_, l); | 2369 LogParam(p.name_, l); |
2352 l->append(L", "); | 2370 l->append(L", "); |
2353 LogParam(p.description_, l); | 2371 LogParam(p.description_, l); |
2354 l->append(L")"); | 2372 l->append(L")"); |
2355 } | 2373 } |
2356 }; | 2374 }; |
2357 | 2375 |
| 2376 // Traits for ViewHostMsg_IDBDatabaseCreateObjectStore_Params. |
| 2377 template <> |
| 2378 struct ParamTraits<ViewHostMsg_IDBDatabaseCreateObjectStore_Params> { |
| 2379 typedef ViewHostMsg_IDBDatabaseCreateObjectStore_Params param_type; |
| 2380 static void Write(Message* m, const param_type& p) { |
| 2381 WriteParam(m, p.response_id_); |
| 2382 WriteParam(m, p.name_); |
| 2383 WriteParam(m, p.keypath_); |
| 2384 WriteParam(m, p.auto_increment_); |
| 2385 WriteParam(m, p.idb_database_id_); |
| 2386 } |
| 2387 static bool Read(const Message* m, void** iter, param_type* p) { |
| 2388 return |
| 2389 ReadParam(m, iter, &p->response_id_) && |
| 2390 ReadParam(m, iter, &p->name_) && |
| 2391 ReadParam(m, iter, &p->keypath_) && |
| 2392 ReadParam(m, iter, &p->auto_increment_) && |
| 2393 ReadParam(m, iter, &p->idb_database_id_); |
| 2394 } |
| 2395 static void Log(const param_type& p, std::wstring* l) { |
| 2396 l->append(L"("); |
| 2397 LogParam(p.response_id_, l); |
| 2398 l->append(L", "); |
| 2399 LogParam(p.name_, l); |
| 2400 l->append(L", "); |
| 2401 LogParam(p.keypath_, l); |
| 2402 l->append(L", "); |
| 2403 LogParam(p.auto_increment_, l); |
| 2404 l->append(L", "); |
| 2405 LogParam(p.idb_database_id_, l); |
| 2406 l->append(L")"); |
| 2407 } |
| 2408 }; |
| 2409 |
2358 // Traits for ViewHostMsg_CreateWorker_Params | 2410 // Traits for ViewHostMsg_CreateWorker_Params |
2359 template <> | 2411 template <> |
2360 struct ParamTraits<ViewHostMsg_CreateWorker_Params> { | 2412 struct ParamTraits<ViewHostMsg_CreateWorker_Params> { |
2361 typedef ViewHostMsg_CreateWorker_Params param_type; | 2413 typedef ViewHostMsg_CreateWorker_Params param_type; |
2362 static void Write(Message* m, const param_type& p) { | 2414 static void Write(Message* m, const param_type& p) { |
2363 WriteParam(m, p.url); | 2415 WriteParam(m, p.url); |
2364 WriteParam(m, p.is_shared); | 2416 WriteParam(m, p.is_shared); |
2365 WriteParam(m, p.name); | 2417 WriteParam(m, p.name); |
2366 WriteParam(m, p.document_id); | 2418 WriteParam(m, p.document_id); |
2367 WriteParam(m, p.render_view_route_id); | 2419 WriteParam(m, p.render_view_route_id); |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2650 l->append(L")"); | 2702 l->append(L")"); |
2651 } | 2703 } |
2652 }; | 2704 }; |
2653 | 2705 |
2654 } // namespace IPC | 2706 } // namespace IPC |
2655 | 2707 |
2656 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2708 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
2657 #include "ipc/ipc_message_macros.h" | 2709 #include "ipc/ipc_message_macros.h" |
2658 | 2710 |
2659 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2711 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |