Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: chrome/common/render_messages_params.h

Issue 5680007: Make IndexedDBDispatcherHost be a message filter and move its messages into a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/common/render_messages_params.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_PARAMS_H_ 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_
6 #define CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ 6 #define CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "app/surface/transport_dib.h" 12 #include "app/surface/transport_dib.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/file_util_proxy.h" 14 #include "base/file_util_proxy.h"
15 #include "base/ref_counted.h" 15 #include "base/ref_counted.h"
16 #include "base/shared_memory.h" 16 #include "base/shared_memory.h"
17 #include "base/time.h" 17 #include "base/time.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "chrome/common/dom_storage_common.h" 19 #include "chrome/common/dom_storage_common.h"
20 #include "chrome/common/extensions/extension.h" 20 #include "chrome/common/extensions/extension.h"
21 #include "chrome/common/extensions/extension_extent.h" 21 #include "chrome/common/extensions/extension_extent.h"
22 #include "chrome/common/extensions/url_pattern.h" 22 #include "chrome/common/extensions/url_pattern.h"
23 #include "chrome/common/indexed_db_key.h"
24 #include "chrome/common/navigation_gesture.h" 23 #include "chrome/common/navigation_gesture.h"
25 #include "chrome/common/navigation_types.h" 24 #include "chrome/common/navigation_types.h"
26 #include "chrome/common/page_transition_types.h" 25 #include "chrome/common/page_transition_types.h"
27 #include "chrome/common/renderer_preferences.h" 26 #include "chrome/common/renderer_preferences.h"
28 #include "chrome/common/serialized_script_value.h" 27 #include "chrome/common/serialized_script_value.h"
29 #include "chrome/common/window_container_type.h" 28 #include "chrome/common/window_container_type.h"
30 #include "gfx/rect.h" 29 #include "gfx/rect.h"
31 #include "gfx/size.h" 30 #include "gfx/size.h"
32 #include "googleurl/src/gurl.h" 31 #include "googleurl/src/gurl.h"
33 #include "ipc/ipc_param_traits.h" 32 #include "ipc/ipc_param_traits.h"
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 // The origin this is associated with. 651 // The origin this is associated with.
653 string16 origin_; 652 string16 origin_;
654 653
655 // The URL of the page that caused the storage event. 654 // The URL of the page that caused the storage event.
656 GURL url_; 655 GURL url_;
657 656
658 // The storage type of this event. 657 // The storage type of this event.
659 DOMStorageType storage_type_; 658 DOMStorageType storage_type_;
660 }; 659 };
661 660
662 // Used to open an indexed database.
663 struct ViewHostMsg_IDBFactoryOpen_Params {
664 ViewHostMsg_IDBFactoryOpen_Params();
665 ~ViewHostMsg_IDBFactoryOpen_Params();
666
667 // The routing ID of the view initiating the open.
668 int32 routing_id_;
669
670 // The response should have this id.
671 int32 response_id_;
672
673 // The origin doing the initiating.
674 string16 origin_;
675
676 // The name of the database.
677 string16 name_;
678
679 // The maximum size of the database.
680 uint64 maximum_size_;
681 };
682
683 // Used to create an object store.
684 struct ViewHostMsg_IDBDatabaseCreateObjectStore_Params {
685 ViewHostMsg_IDBDatabaseCreateObjectStore_Params();
686 ~ViewHostMsg_IDBDatabaseCreateObjectStore_Params();
687
688 // The name of the object store.
689 string16 name_;
690
691 // The keyPath of the object store.
692 NullableString16 key_path_;
693
694 // Whether the object store created should have a key generator.
695 bool auto_increment_;
696
697 // The transaction this is associated with.
698 int32 transaction_id_;
699
700 // The database the object store belongs to.
701 int32 idb_database_id_;
702 };
703
704 // Used to open both cursors and object cursors in IndexedDB.
705 struct ViewHostMsg_IDBIndexOpenCursor_Params {
706 ViewHostMsg_IDBIndexOpenCursor_Params();
707 ~ViewHostMsg_IDBIndexOpenCursor_Params();
708
709 // The response should have this id.
710 int32 response_id_;
711
712 // The serialized lower key.
713 IndexedDBKey lower_key_;
714
715 // The serialized upper key.
716 IndexedDBKey upper_key_;
717
718 // Is the lower bound open?
719 bool lower_open_;
720
721 // Is the upper bound open?
722 bool upper_open_;
723
724 // The direction of this cursor.
725 int32 direction_;
726
727 // The index the index belongs to.
728 int32 idb_index_id_;
729
730 // The transaction this request belongs to.
731 int transaction_id_;
732 };
733
734 // Used to set a value in an object store.
735 struct ViewHostMsg_IDBObjectStorePut_Params {
736 ViewHostMsg_IDBObjectStorePut_Params();
737 ~ViewHostMsg_IDBObjectStorePut_Params();
738
739 // The object store's id.
740 int32 idb_object_store_id_;
741
742 // The id any response should contain.
743 int32 response_id_;
744
745 // The value to set.
746 SerializedScriptValue serialized_value_;
747
748 // The key to set it on (may not be "valid"/set in some cases).
749 IndexedDBKey key_;
750
751 // If it already exists, don't update (just return an error).
752 bool add_only_;
753
754 // The transaction it's associated with.
755 int transaction_id_;
756 };
757
758 // Used to create an index.
759 struct ViewHostMsg_IDBObjectStoreCreateIndex_Params {
760 ViewHostMsg_IDBObjectStoreCreateIndex_Params();
761 ~ViewHostMsg_IDBObjectStoreCreateIndex_Params();
762
763 // The name of the index.
764 string16 name_;
765
766 // The keyPath of the index.
767 NullableString16 key_path_;
768
769 // Whether the index created has unique keys.
770 bool unique_;
771
772 // The transaction this is associated with.
773 int32 transaction_id_;
774
775 // The object store the index belongs to.
776 int32 idb_object_store_id_;
777 };
778
779 // Used to open an IndexedDB cursor.
780 struct ViewHostMsg_IDBObjectStoreOpenCursor_Params {
781 ViewHostMsg_IDBObjectStoreOpenCursor_Params();
782 ~ViewHostMsg_IDBObjectStoreOpenCursor_Params();
783
784 // The response should have this id.
785 int32 response_id_;
786
787 // The serialized lower key.
788 IndexedDBKey lower_key_;
789
790 // The serialized upper key.
791 IndexedDBKey upper_key_;
792
793 // Is the lower bound open?
794 bool lower_open_;
795
796 // Is the upper bound open?
797 bool upper_open_;
798
799 // The direction of this cursor.
800 int32 direction_;
801
802 // The object store the cursor belongs to.
803 int32 idb_object_store_id_;
804
805 // The transaction this request belongs to.
806 int transaction_id_;
807 };
808
809 // Allows an extension to execute code in a tab. 661 // Allows an extension to execute code in a tab.
810 struct ViewMsg_ExecuteCode_Params { 662 struct ViewMsg_ExecuteCode_Params {
811 ViewMsg_ExecuteCode_Params(); 663 ViewMsg_ExecuteCode_Params();
812 ViewMsg_ExecuteCode_Params(int request_id, const std::string& extension_id, 664 ViewMsg_ExecuteCode_Params(int request_id, const std::string& extension_id,
813 bool is_javascript, const std::string& code, 665 bool is_javascript, const std::string& code,
814 bool all_frames); 666 bool all_frames);
815 ~ViewMsg_ExecuteCode_Params(); 667 ~ViewMsg_ExecuteCode_Params();
816 668
817 // The extension API request id, for responding. 669 // The extension API request id, for responding.
818 int request_id; 670 int request_id;
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 }; 1043 };
1192 1044
1193 template <> 1045 template <>
1194 struct ParamTraits<ViewMsg_DOMStorageEvent_Params> { 1046 struct ParamTraits<ViewMsg_DOMStorageEvent_Params> {
1195 typedef ViewMsg_DOMStorageEvent_Params param_type; 1047 typedef ViewMsg_DOMStorageEvent_Params param_type;
1196 static void Write(Message* m, const param_type& p); 1048 static void Write(Message* m, const param_type& p);
1197 static bool Read(const Message* m, void** iter, param_type* p); 1049 static bool Read(const Message* m, void** iter, param_type* p);
1198 static void Log(const param_type& p, std::string* l); 1050 static void Log(const param_type& p, std::string* l);
1199 }; 1051 };
1200 1052
1201 template <>
1202 struct ParamTraits<ViewHostMsg_IDBFactoryOpen_Params> {
1203 typedef ViewHostMsg_IDBFactoryOpen_Params param_type;
1204 static void Write(Message* m, const param_type& p);
1205 static bool Read(const Message* m, void** iter, param_type* p);
1206 static void Log(const param_type& p, std::string* l);
1207 };
1208
1209 template <>
1210 struct ParamTraits<ViewHostMsg_IDBDatabaseCreateObjectStore_Params> {
1211 typedef ViewHostMsg_IDBDatabaseCreateObjectStore_Params param_type;
1212 static void Write(Message* m, const param_type& p);
1213 static bool Read(const Message* m, void** iter, param_type* p);
1214 static void Log(const param_type& p, std::string* l);
1215 };
1216
1217 template <>
1218 struct ParamTraits<ViewHostMsg_IDBIndexOpenCursor_Params> {
1219 typedef ViewHostMsg_IDBIndexOpenCursor_Params param_type;
1220 static void Write(Message* m, const param_type& p);
1221 static bool Read(const Message* m, void** iter, param_type* p);
1222 static void Log(const param_type& p, std::string* l);
1223 };
1224
1225 template <>
1226 struct ParamTraits<ViewHostMsg_IDBObjectStorePut_Params> {
1227 typedef ViewHostMsg_IDBObjectStorePut_Params param_type;
1228 static void Write(Message* m, const param_type& p);
1229 static bool Read(const Message* m, void** iter, param_type* p);
1230 static void Log(const param_type& p, std::string* l);
1231 };
1232
1233 template <>
1234 struct ParamTraits<ViewHostMsg_IDBObjectStoreCreateIndex_Params> {
1235 typedef ViewHostMsg_IDBObjectStoreCreateIndex_Params param_type;
1236 static void Write(Message* m, const param_type& p);
1237 static bool Read(const Message* m, void** iter, param_type* p);
1238 static void Log(const param_type& p, std::string* l);
1239 };
1240
1241 template <>
1242 struct ParamTraits<ViewHostMsg_IDBObjectStoreOpenCursor_Params> {
1243 typedef ViewHostMsg_IDBObjectStoreOpenCursor_Params param_type;
1244 static void Write(Message* m, const param_type& p);
1245 static bool Read(const Message* m, void** iter, param_type* p);
1246 static void Log(const param_type& p, std::string* l);
1247 };
1248
1249 template<> 1053 template<>
1250 struct ParamTraits<ViewMsg_ExecuteCode_Params> { 1054 struct ParamTraits<ViewMsg_ExecuteCode_Params> {
1251 typedef ViewMsg_ExecuteCode_Params param_type; 1055 typedef ViewMsg_ExecuteCode_Params param_type;
1252 static void Write(Message* m, const param_type& p); 1056 static void Write(Message* m, const param_type& p);
1253 static bool Read(const Message* m, void** iter, param_type* p); 1057 static bool Read(const Message* m, void** iter, param_type* p);
1254 static void Log(const param_type& p, std::string* l); 1058 static void Log(const param_type& p, std::string* l);
1255 }; 1059 };
1256 1060
1257 template <> 1061 template <>
1258 struct ParamTraits<ViewHostMsg_CreateWorker_Params> { 1062 struct ParamTraits<ViewHostMsg_CreateWorker_Params> {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 struct ParamTraits<ViewHostMsg_AccessibilityNotification_Params> { 1142 struct ParamTraits<ViewHostMsg_AccessibilityNotification_Params> {
1339 typedef ViewHostMsg_AccessibilityNotification_Params param_type; 1143 typedef ViewHostMsg_AccessibilityNotification_Params param_type;
1340 static void Write(Message* m, const param_type& p); 1144 static void Write(Message* m, const param_type& p);
1341 static bool Read(const Message* m, void** iter, param_type* p); 1145 static bool Read(const Message* m, void** iter, param_type* p);
1342 static void Log(const param_type& p, std::string* l); 1146 static void Log(const param_type& p, std::string* l);
1343 }; 1147 };
1344 1148
1345 } // namespace IPC 1149 } // namespace IPC
1346 1150
1347 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_ 1151 #endif // CHROME_COMMON_RENDER_MESSAGES_PARAMS_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/common/render_messages_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698