OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Multiply-included message file, no traditional include guard. | 5 // Multiply-included message file, no traditional include guard. |
6 #include "content/public/common/common_param_traits.h" | 6 #include "content/public/common/common_param_traits.h" |
7 #include "googleurl/src/gurl.h" | 7 #include "googleurl/src/gurl.h" |
8 #include "ipc/ipc_message_macros.h" | 8 #include "ipc/ipc_message_macros.h" |
9 #include "ipc/ipc_param_traits.h" | 9 #include "ipc/ipc_param_traits.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // The non-zero connection_id which caused the event or 0 if the event | 32 // The non-zero connection_id which caused the event or 0 if the event |
33 // was not caused by the target renderer process. | 33 // was not caused by the target renderer process. |
34 IPC_STRUCT_MEMBER(int, connection_id) | 34 IPC_STRUCT_MEMBER(int, connection_id) |
35 IPC_STRUCT_END() | 35 IPC_STRUCT_END() |
36 | 36 |
37 IPC_ENUM_TRAITS(WebKit::WebStorageArea::Result) | 37 IPC_ENUM_TRAITS(WebKit::WebStorageArea::Result) |
38 | 38 |
39 // DOM Storage messages sent from the browser to the renderer. | 39 // DOM Storage messages sent from the browser to the renderer. |
40 | 40 |
41 // Storage events are broadcast to renderer processes. | 41 // Storage events are broadcast to all renderer processes. |
42 IPC_MESSAGE_CONTROL1(DOMStorageMsg_Event, | 42 IPC_MESSAGE_CONTROL1(DOMStorageMsg_Event, |
43 DOMStorageMsg_Event_Params) | 43 DOMStorageMsg_Event_Params) |
44 | 44 |
| 45 // Completion notification sent in response to each async |
| 46 // set, remove, and clear operation. Used to maintain the integrity |
| 47 // of the renderer-side cache. |
| 48 IPC_MESSAGE_CONTROL2(DOMStorageHostMsg_AsyncOperationComplete, |
| 49 int /* operation_id */, |
| 50 bool /* success */) |
45 | 51 |
46 // DOM Storage messages sent from the renderer to the browser. | 52 // DOM Storage messages sent from the renderer to the browser. |
47 // Note: The 'connection_id' must be the first parameter in these message. | 53 // Note: The 'connection_id' must be the first parameter in these message. |
48 | 54 |
49 // Open the storage area for a particular origin within a namespace. | 55 // Open the storage area for a particular origin within a namespace. |
50 IPC_MESSAGE_CONTROL3(DOMStorageHostMsg_OpenStorageArea, | 56 IPC_MESSAGE_CONTROL3(DOMStorageHostMsg_OpenStorageArea, |
51 int /* connection_id */, | 57 int /* connection_id */, |
52 int64 /* namespace_id */, | 58 int64 /* namespace_id */, |
53 GURL /* origin */) | 59 GURL /* origin */) |
54 | 60 |
55 // Close a previously opened storage area. | 61 // Close a previously opened storage area. |
56 IPC_MESSAGE_CONTROL1(DOMStorageHostMsg_CloseStorageArea, | 62 IPC_MESSAGE_CONTROL1(DOMStorageHostMsg_CloseStorageArea, |
57 int /* connection_id */) | 63 int /* connection_id */) |
58 | 64 |
| 65 // Retrieves the set of key/value pairs for the area. Used to prime |
| 66 // the renderer-side cache. |
| 67 IPC_SYNC_MESSAGE_CONTROL1_1(DOMStorageHostMsg_LoadStorageArea, |
| 68 int /* connection_id */, |
| 69 dom_storage::ValuesMap) |
| 70 |
59 // Get the length of a storage area. | 71 // Get the length of a storage area. |
60 IPC_SYNC_MESSAGE_CONTROL1_1(DOMStorageHostMsg_Length, | 72 IPC_SYNC_MESSAGE_CONTROL1_1(DOMStorageHostMsg_Length, |
61 int /* connection_id */, | 73 int /* connection_id */, |
62 unsigned /* length */) | 74 unsigned /* length */) |
63 | 75 |
64 // Get a the ith key within a storage area. | 76 // Get a the ith key within a storage area. |
65 IPC_SYNC_MESSAGE_CONTROL2_1(DOMStorageHostMsg_Key, | 77 IPC_SYNC_MESSAGE_CONTROL2_1(DOMStorageHostMsg_Key, |
66 int /* connection_id */, | 78 int /* connection_id */, |
67 unsigned /* index */, | 79 unsigned /* index */, |
68 NullableString16 /* key */) | 80 NullableString16 /* key */) |
69 | 81 |
70 // Get a value based on a key from a storage area. | 82 // Get a value based on a key from a storage area. |
71 IPC_SYNC_MESSAGE_CONTROL2_1(DOMStorageHostMsg_GetItem, | 83 IPC_SYNC_MESSAGE_CONTROL2_1(DOMStorageHostMsg_GetItem, |
72 int /* connection_id */, | 84 int /* connection_id */, |
73 string16 /* key */, | 85 string16 /* key */, |
74 NullableString16 /* value */) | 86 NullableString16 /* value */) |
75 | 87 |
| 88 // TODO(michaeln): after the old sync IPC message have been deleted, |
| 89 // rename the Async ones to no longer have the Async suffix. |
| 90 |
76 // Set a value that's associated with a key in a storage area. | 91 // Set a value that's associated with a key in a storage area. |
77 IPC_SYNC_MESSAGE_CONTROL4_2(DOMStorageHostMsg_SetItem, | 92 IPC_SYNC_MESSAGE_CONTROL4_2(DOMStorageHostMsg_SetItem, |
78 int /* connection_id */, | 93 int /* connection_id */, |
79 string16 /* key */, | 94 string16 /* key */, |
80 string16 /* value */, | 95 string16 /* value */, |
81 GURL /* page_url */, | 96 GURL /* page_url */, |
82 WebKit::WebStorageArea::Result /* result */, | 97 WebKit::WebStorageArea::Result /* result */, |
83 NullableString16 /* old_value */) | 98 NullableString16 /* old_value */) |
84 | 99 |
| 100 // Set a value that's associated with a key in a storage area. |
| 101 // A completion notification is sent in response. |
| 102 IPC_MESSAGE_CONTROL5(DOMStorageHostMsg_SetItemAsync, |
| 103 int /* connection_id */, |
| 104 int /* operation_id */, |
| 105 string16 /* key */, |
| 106 string16 /* value */, |
| 107 GURL /* page_url */) |
| 108 |
85 // Remove the value associated with a key in a storage area. | 109 // Remove the value associated with a key in a storage area. |
86 IPC_SYNC_MESSAGE_CONTROL3_1(DOMStorageHostMsg_RemoveItem, | 110 IPC_SYNC_MESSAGE_CONTROL3_1(DOMStorageHostMsg_RemoveItem, |
87 int /* connection_id */, | 111 int /* connection_id */, |
88 string16 /* key */, | 112 string16 /* key */, |
89 GURL /* page_url */, | 113 GURL /* page_url */, |
90 NullableString16 /* old_value */) | 114 NullableString16 /* old_value */) |
91 | 115 |
| 116 // Remove the value associated with a key in a storage area. |
| 117 // A completion notification is sent in response. |
| 118 IPC_MESSAGE_CONTROL4(DOMStorageHostMsg_RemoveItemAsync, |
| 119 int /* connection_id */, |
| 120 int /* operation_id */, |
| 121 string16 /* key */, |
| 122 GURL /* page_url */) |
| 123 |
92 // Clear the storage area. | 124 // Clear the storage area. |
93 IPC_SYNC_MESSAGE_CONTROL2_1(DOMStorageHostMsg_Clear, | 125 IPC_SYNC_MESSAGE_CONTROL2_1(DOMStorageHostMsg_Clear, |
94 int /* connection_id */, | 126 int /* connection_id */, |
95 GURL /* page_url */, | 127 GURL /* page_url */, |
96 bool /* something_cleared */) | 128 bool /* something_cleared */) |
97 | 129 |
| 130 // Clear the storage area. A completion notification is sent in response. |
| 131 IPC_MESSAGE_CONTROL3(DOMStorageHostMsg_ClearAsync, |
| 132 int /* connection_id */, |
| 133 int /* operation_id */, |
| 134 GURL /* page_url */) |
OLD | NEW |