| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 include guard. | 5 // Multiply-included message file, no include guard. |
| 6 | 6 |
| 7 #include "ipc/ipc_message_macros.h" | 7 #include "ipc/ipc_message_macros.h" |
| 8 #include "ipc/ipc_param_traits.h" | 8 #include "ipc/ipc_param_traits.h" |
| 9 #include "ipc/ipc_platform_file.h" | 9 #include "ipc/ipc_platform_file.h" |
| 10 | 10 |
| 11 #define IPC_MESSAGE_START DatabaseMsgStart | 11 #define IPC_MESSAGE_START DatabaseMsgStart |
| 12 | 12 |
| 13 // Database messages sent from the browser to the renderer. | 13 // Database messages sent from the browser to the renderer. |
| 14 | 14 |
| 15 // Notifies the child process of the new database size | 15 // Notifies the child process of the new database size |
| 16 IPC_MESSAGE_CONTROL4(DatabaseMsg_UpdateSize, | 16 IPC_MESSAGE_CONTROL3(DatabaseMsg_UpdateSize, |
| 17 string16 /* the origin */, | 17 string16 /* the origin */, |
| 18 string16 /* the database name */, | 18 string16 /* the database name */, |
| 19 int64 /* the new database size */, | 19 int64 /* the new database size */) |
| 20 |
| 21 // Notifies the child process of the new space available |
| 22 IPC_MESSAGE_CONTROL2(DatabaseMsg_UpdateSpaceAvailable, |
| 23 string16 /* the origin */, |
| 20 int64 /* space available to origin */) | 24 int64 /* space available to origin */) |
| 21 | 25 |
| 26 // Notifies the child process to reset it's cached value for the origin. |
| 27 IPC_MESSAGE_CONTROL1(DatabaseMsg_ResetSpaceAvailable, |
| 28 string16 /* the origin */) |
| 29 |
| 22 // Asks the child process to close a database immediately | 30 // Asks the child process to close a database immediately |
| 23 IPC_MESSAGE_CONTROL2(DatabaseMsg_CloseImmediately, | 31 IPC_MESSAGE_CONTROL2(DatabaseMsg_CloseImmediately, |
| 24 string16 /* the origin */, | 32 string16 /* the origin */, |
| 25 string16 /* the database name */) | 33 string16 /* the database name */) |
| 26 | 34 |
| 27 // Database messages sent from the renderer to the browser. | 35 // Database messages sent from the renderer to the browser. |
| 28 | 36 |
| 29 // Asks the browser process to open a DB file with the given name. | 37 // Asks the browser process to open a DB file with the given name. |
| 30 IPC_SYNC_MESSAGE_CONTROL2_1(DatabaseHostMsg_OpenFile, | 38 IPC_SYNC_MESSAGE_CONTROL2_1(DatabaseHostMsg_OpenFile, |
| 31 string16 /* vfs file name */, | 39 string16 /* vfs file name */, |
| 32 int /* desired flags */, | 40 int /* desired flags */, |
| 33 IPC::PlatformFileForTransit /* file_handle */) | 41 IPC::PlatformFileForTransit /* file_handle */) |
| 34 | 42 |
| 35 // Asks the browser process to delete a DB file | 43 // Asks the browser process to delete a DB file |
| 36 IPC_SYNC_MESSAGE_CONTROL2_1(DatabaseHostMsg_DeleteFile, | 44 IPC_SYNC_MESSAGE_CONTROL2_1(DatabaseHostMsg_DeleteFile, |
| 37 string16 /* vfs file name */, | 45 string16 /* vfs file name */, |
| 38 bool /* whether or not to sync the directory */, | 46 bool /* whether or not to sync the directory */, |
| 39 int /* SQLite error code */) | 47 int /* SQLite error code */) |
| 40 | 48 |
| 41 // Asks the browser process to return the attributes of a DB file | 49 // Asks the browser process to return the attributes of a DB file |
| 42 IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileAttributes, | 50 IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileAttributes, |
| 43 string16 /* vfs file name */, | 51 string16 /* vfs file name */, |
| 44 int32 /* the attributes for the given DB file */) | 52 int32 /* the attributes for the given DB file */) |
| 45 | 53 |
| 46 // Asks the browser process to return the size of a DB file | 54 // Asks the browser process to return the size of a DB file |
| 47 IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileSize, | 55 IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileSize, |
| 48 string16 /* vfs file name */, | 56 string16 /* vfs file name */, |
| 49 int64 /* the size of the given DB file */) | 57 int64 /* the size of the given DB file */) |
| 50 | 58 |
| 59 // Asks the browser process for the amount of space available to an origin |
| 60 IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetSpaceAvailable, |
| 61 string16 /* origin identifier */, |
| 62 int64 /* remaining space available */) |
| 63 |
| 51 // Notifies the browser process that a new database has been opened | 64 // Notifies the browser process that a new database has been opened |
| 52 IPC_MESSAGE_CONTROL4(DatabaseHostMsg_Opened, | 65 IPC_MESSAGE_CONTROL4(DatabaseHostMsg_Opened, |
| 53 string16 /* origin identifier */, | 66 string16 /* origin identifier */, |
| 54 string16 /* database name */, | 67 string16 /* database name */, |
| 55 string16 /* database description */, | 68 string16 /* database description */, |
| 56 int64 /* estimated size */) | 69 int64 /* estimated size */) |
| 57 | 70 |
| 58 // Notifies the browser process that a database might have been modified | 71 // Notifies the browser process that a database might have been modified |
| 59 IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Modified, | 72 IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Modified, |
| 60 string16 /* origin identifier */, | 73 string16 /* origin identifier */, |
| 61 string16 /* database name */) | 74 string16 /* database name */) |
| 62 | 75 |
| 63 // Notifies the browser process that a database is about to close | 76 // Notifies the browser process that a database is about to close |
| 64 IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Closed, | 77 IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Closed, |
| 65 string16 /* origin identifier */, | 78 string16 /* origin identifier */, |
| 66 string16 /* database name */) | 79 string16 /* database name */) |
| 67 | 80 |
| OLD | NEW |