| 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 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 IPC_ENUM_TRAITS(WebKit::WebStorageArea::Result) | 41 IPC_ENUM_TRAITS(WebKit::WebStorageArea::Result) |
| 42 | 42 |
| 43 // DOM Storage messages sent from the browser to the renderer. | 43 // DOM Storage messages sent from the browser to the renderer. |
| 44 | 44 |
| 45 // Storage events are broadcast to all renderer processes. | 45 // Storage events are broadcast to all renderer processes. |
| 46 IPC_MESSAGE_CONTROL1(DOMStorageMsg_Event, | 46 IPC_MESSAGE_CONTROL1(DOMStorageMsg_Event, |
| 47 DOMStorageMsg_Event_Params) | 47 DOMStorageMsg_Event_Params) |
| 48 | 48 |
| 49 // Completion notification sent in response to each async | 49 // Completion notification sent in response to each async |
| 50 // set, remove, and clear operation. Used to maintain the integrity | 50 // load, set, remove, and clear operation. |
| 51 // of the renderer-side cache. | 51 // Used to maintain the integrity of the renderer-side cache. |
| 52 IPC_MESSAGE_CONTROL2(DOMStorageMsg_AsyncOperationComplete, | 52 IPC_MESSAGE_CONTROL1(DOMStorageMsg_AsyncOperationComplete, |
| 53 int /* operation_id */, | |
| 54 bool /* success */) | 53 bool /* success */) |
| 55 | 54 |
| 56 // DOM Storage messages sent from the renderer to the browser. | 55 // DOM Storage messages sent from the renderer to the browser. |
| 57 // Note: The 'connection_id' must be the first parameter in these message. | 56 // Note: The 'connection_id' must be the first parameter in these message. |
| 58 | 57 |
| 59 // Open the storage area for a particular origin within a namespace. | 58 // Open the storage area for a particular origin within a namespace. |
| 60 IPC_MESSAGE_CONTROL3(DOMStorageHostMsg_OpenStorageArea, | 59 IPC_MESSAGE_CONTROL3(DOMStorageHostMsg_OpenStorageArea, |
| 61 int /* connection_id */, | 60 int /* connection_id */, |
| 62 int64 /* namespace_id */, | 61 int64 /* namespace_id */, |
| 63 GURL /* origin */) | 62 GURL /* origin */) |
| 64 | 63 |
| 65 // Close a previously opened storage area. | 64 // Close a previously opened storage area. |
| 66 IPC_MESSAGE_CONTROL1(DOMStorageHostMsg_CloseStorageArea, | 65 IPC_MESSAGE_CONTROL1(DOMStorageHostMsg_CloseStorageArea, |
| 67 int /* connection_id */) | 66 int /* connection_id */) |
| 68 | 67 |
| 69 // Retrieves the set of key/value pairs for the area. Used to prime | 68 // Retrieves the set of key/value pairs for the area. Used to prime |
| 70 // the renderer-side cache. | 69 // the renderer-side cache. A completion notification is sent in response. |
| 71 IPC_SYNC_MESSAGE_CONTROL1_1(DOMStorageHostMsg_LoadStorageArea, | 70 IPC_SYNC_MESSAGE_CONTROL1_1(DOMStorageHostMsg_LoadStorageArea, |
| 72 int /* connection_id */, | 71 int /* connection_id */, |
| 73 dom_storage::ValuesMap) | 72 dom_storage::ValuesMap) |
| 74 | 73 |
| 75 // Get the length of a storage area. | |
| 76 IPC_SYNC_MESSAGE_CONTROL1_1(DOMStorageHostMsg_Length, | |
| 77 int /* connection_id */, | |
| 78 unsigned /* length */) | |
| 79 | |
| 80 // Get a the ith key within a storage area. | |
| 81 IPC_SYNC_MESSAGE_CONTROL2_1(DOMStorageHostMsg_Key, | |
| 82 int /* connection_id */, | |
| 83 unsigned /* index */, | |
| 84 NullableString16 /* key */) | |
| 85 | |
| 86 // Get a value based on a key from a storage area. | |
| 87 IPC_SYNC_MESSAGE_CONTROL2_1(DOMStorageHostMsg_GetItem, | |
| 88 int /* connection_id */, | |
| 89 string16 /* key */, | |
| 90 NullableString16 /* value */) | |
| 91 | |
| 92 // TODO(michaeln): after the old sync IPC message have been deleted, | |
| 93 // rename the Async ones to no longer have the Async suffix. | |
| 94 | |
| 95 // Set a value that's associated with a key in a storage area. | |
| 96 IPC_SYNC_MESSAGE_CONTROL4_2(DOMStorageHostMsg_SetItem, | |
| 97 int /* connection_id */, | |
| 98 string16 /* key */, | |
| 99 string16 /* value */, | |
| 100 GURL /* page_url */, | |
| 101 WebKit::WebStorageArea::Result /* result */, | |
| 102 NullableString16 /* old_value */) | |
| 103 | |
| 104 // Set a value that's associated with a key in a storage area. | 74 // Set a value that's associated with a key in a storage area. |
| 105 // A completion notification is sent in response. | 75 // A completion notification is sent in response. |
| 106 IPC_MESSAGE_CONTROL5(DOMStorageHostMsg_SetItemAsync, | 76 IPC_MESSAGE_CONTROL4(DOMStorageHostMsg_SetItem, |
| 107 int /* connection_id */, | 77 int /* connection_id */, |
| 108 int /* operation_id */, | |
| 109 string16 /* key */, | 78 string16 /* key */, |
| 110 string16 /* value */, | 79 string16 /* value */, |
| 111 GURL /* page_url */) | 80 GURL /* page_url */) |
| 112 | 81 |
| 113 // Remove the value associated with a key in a storage area. | 82 // Remove the value associated with a key in a storage area. |
| 114 IPC_SYNC_MESSAGE_CONTROL3_1(DOMStorageHostMsg_RemoveItem, | |
| 115 int /* connection_id */, | |
| 116 string16 /* key */, | |
| 117 GURL /* page_url */, | |
| 118 NullableString16 /* old_value */) | |
| 119 | |
| 120 // Remove the value associated with a key in a storage area. | |
| 121 // A completion notification is sent in response. | 83 // A completion notification is sent in response. |
| 122 IPC_MESSAGE_CONTROL4(DOMStorageHostMsg_RemoveItemAsync, | 84 IPC_MESSAGE_CONTROL3(DOMStorageHostMsg_RemoveItem, |
| 123 int /* connection_id */, | 85 int /* connection_id */, |
| 124 int /* operation_id */, | |
| 125 string16 /* key */, | 86 string16 /* key */, |
| 126 GURL /* page_url */) | 87 GURL /* page_url */) |
| 127 | 88 |
| 128 // Clear the storage area. | 89 // Clear the storage area. A completion notification is sent in response. |
| 129 IPC_SYNC_MESSAGE_CONTROL2_1(DOMStorageHostMsg_Clear, | 90 IPC_MESSAGE_CONTROL2(DOMStorageHostMsg_Clear, |
| 130 int /* connection_id */, | 91 int /* connection_id */, |
| 131 GURL /* page_url */, | 92 GURL /* page_url */) |
| 132 bool /* something_cleared */) | |
| 133 | 93 |
| 134 // Clear the storage area. A completion notification is sent in response. | 94 // Used to flush the ipc message queue. |
| 135 IPC_MESSAGE_CONTROL3(DOMStorageHostMsg_ClearAsync, | 95 IPC_SYNC_MESSAGE_CONTROL0_0(DOMStorageHostMsg_FlushMessages) |
| 136 int /* connection_id */, | |
| 137 int /* operation_id */, | |
| 138 GURL /* page_url */) | |
| OLD | NEW |