OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_COMMON_DATABASE_MESSAGES_H_ |
| 6 #define CHROME_COMMON_DATABASE_MESSAGES_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "ipc/ipc_message_macros.h" |
| 10 #include "ipc/ipc_param_traits.h" |
| 11 #include "ipc/ipc_platform_file.h" |
| 12 |
| 13 #define IPC_MESSAGE_START DatabaseMsgStart |
| 14 |
| 15 // Database messages sent from the browser to the renderer. |
| 16 |
| 17 // Notifies the child process of the new database size |
| 18 IPC_MESSAGE_CONTROL4(DatabaseMsg_UpdateSize, |
| 19 string16 /* the origin */, |
| 20 string16 /* the database name */, |
| 21 int64 /* the new database size */, |
| 22 int64 /* space available to origin */) |
| 23 |
| 24 // Asks the child process to close a database immediately |
| 25 IPC_MESSAGE_CONTROL2(DatabaseMsg_CloseImmediately, |
| 26 string16 /* the origin */, |
| 27 string16 /* the database name */) |
| 28 |
| 29 // Database messages sent from the renderer to the browser. |
| 30 |
| 31 // Sent by the renderer process to check whether access to web databases is |
| 32 // granted by content settings. This may block and trigger a cookie prompt. |
| 33 IPC_SYNC_MESSAGE_ROUTED4_1(DatabaseHostMsg_Allow, |
| 34 std::string /* origin_url */, |
| 35 string16 /* database name */, |
| 36 string16 /* database display name */, |
| 37 unsigned long /* estimated size */, |
| 38 bool /* result */) |
| 39 |
| 40 // Asks the browser process to open a DB file with the given name. |
| 41 IPC_SYNC_MESSAGE_CONTROL2_1(DatabaseHostMsg_OpenFile, |
| 42 string16 /* vfs file name */, |
| 43 int /* desired flags */, |
| 44 IPC::PlatformFileForTransit /* file_handle */) |
| 45 |
| 46 // Asks the browser process to delete a DB file |
| 47 IPC_SYNC_MESSAGE_CONTROL2_1(DatabaseHostMsg_DeleteFile, |
| 48 string16 /* vfs file name */, |
| 49 bool /* whether or not to sync the directory */, |
| 50 int /* SQLite error code */) |
| 51 |
| 52 // Asks the browser process to return the attributes of a DB file |
| 53 IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileAttributes, |
| 54 string16 /* vfs file name */, |
| 55 int32 /* the attributes for the given DB file */) |
| 56 |
| 57 // Asks the browser process to return the size of a DB file |
| 58 IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileSize, |
| 59 string16 /* vfs file name */, |
| 60 int64 /* the size of the given DB file */) |
| 61 |
| 62 // Notifies the browser process that a new database has been opened |
| 63 IPC_MESSAGE_CONTROL4(DatabaseHostMsg_Opened, |
| 64 string16 /* origin identifier */, |
| 65 string16 /* database name */, |
| 66 string16 /* database description */, |
| 67 int64 /* estimated size */) |
| 68 |
| 69 // Notifies the browser process that a database might have been modified |
| 70 IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Modified, |
| 71 string16 /* origin identifier */, |
| 72 string16 /* database name */) |
| 73 |
| 74 // Notifies the browser process that a database is about to close |
| 75 IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Closed, |
| 76 string16 /* origin identifier */, |
| 77 string16 /* database name */) |
| 78 |
| 79 #endif // CHROME_COMMON_DATABASE_MESSAGES_H_ |
OLD | NEW |