blob: 2a209470dc3d5b5c94ad0d33a32b226ddd6a1459 [file] [log] [blame]
[email protected]37666cf2011-03-13 21:51:421// Copyright (c) 2011 The Chromium Authors. All rights reserved.
[email protected]26a9acf2010-12-13 19:35:052// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]837199722011-03-03 18:15:185// Multiply-included message file, no include guard.
[email protected]26a9acf2010-12-13 19:35:056
7#include "ipc/ipc_message_macros.h"
8#include "ipc/ipc_param_traits.h"
9#include "ipc/ipc_platform_file.h"
10
11#define IPC_MESSAGE_START DatabaseMsgStart
12
13// Database messages sent from the browser to the renderer.
14
15// Notifies the child process of the new database size
[email protected]db4d49812011-05-25 00:34:3216IPC_MESSAGE_CONTROL3(DatabaseMsg_UpdateSize,
[email protected]5e301592013-06-18 06:36:0517 std::string /* the origin */,
[email protected]26a9acf2010-12-13 19:35:0518 string16 /* the database name */,
[email protected]db4d49812011-05-25 00:34:3219 int64 /* the new database size */)
20
21// Notifies the child process of the new space available
22IPC_MESSAGE_CONTROL2(DatabaseMsg_UpdateSpaceAvailable,
[email protected]5e301592013-06-18 06:36:0523 std::string /* the origin */,
[email protected]26a9acf2010-12-13 19:35:0524 int64 /* space available to origin */)
25
[email protected]db4d49812011-05-25 00:34:3226// Notifies the child process to reset it's cached value for the origin.
27IPC_MESSAGE_CONTROL1(DatabaseMsg_ResetSpaceAvailable,
[email protected]5e301592013-06-18 06:36:0528 std::string /* the origin */)
[email protected]db4d49812011-05-25 00:34:3229
[email protected]26a9acf2010-12-13 19:35:0530// Asks the child process to close a database immediately
31IPC_MESSAGE_CONTROL2(DatabaseMsg_CloseImmediately,
[email protected]5e301592013-06-18 06:36:0532 std::string /* the origin */,
[email protected]26a9acf2010-12-13 19:35:0533 string16 /* the database name */)
34
35// Database messages sent from the renderer to the browser.
36
[email protected]26a9acf2010-12-13 19:35:0537// Asks the browser process to open a DB file with the given name.
38IPC_SYNC_MESSAGE_CONTROL2_1(DatabaseHostMsg_OpenFile,
39 string16 /* vfs file name */,
40 int /* desired flags */,
41 IPC::PlatformFileForTransit /* file_handle */)
42
43// Asks the browser process to delete a DB file
44IPC_SYNC_MESSAGE_CONTROL2_1(DatabaseHostMsg_DeleteFile,
45 string16 /* vfs file name */,
46 bool /* whether or not to sync the directory */,
47 int /* SQLite error code */)
48
49// Asks the browser process to return the attributes of a DB file
50IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileAttributes,
51 string16 /* vfs file name */,
52 int32 /* the attributes for the given DB file */)
53
54// Asks the browser process to return the size of a DB file
55IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetFileSize,
56 string16 /* vfs file name */,
57 int64 /* the size of the given DB file */)
58
[email protected]db4d49812011-05-25 00:34:3259// Asks the browser process for the amount of space available to an origin
60IPC_SYNC_MESSAGE_CONTROL1_1(DatabaseHostMsg_GetSpaceAvailable,
[email protected]5e301592013-06-18 06:36:0561 std::string /* origin identifier */,
[email protected]db4d49812011-05-25 00:34:3262 int64 /* remaining space available */)
63
[email protected]26a9acf2010-12-13 19:35:0564// Notifies the browser process that a new database has been opened
65IPC_MESSAGE_CONTROL4(DatabaseHostMsg_Opened,
[email protected]5e301592013-06-18 06:36:0566 std::string /* origin identifier */,
[email protected]26a9acf2010-12-13 19:35:0567 string16 /* database name */,
68 string16 /* database description */,
69 int64 /* estimated size */)
70
71// Notifies the browser process that a database might have been modified
72IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Modified,
[email protected]5e301592013-06-18 06:36:0573 std::string /* origin identifier */,
[email protected]26a9acf2010-12-13 19:35:0574 string16 /* database name */)
75
76// Notifies the browser process that a database is about to close
77IPC_MESSAGE_CONTROL2(DatabaseHostMsg_Closed,
[email protected]5e301592013-06-18 06:36:0578 std::string /* origin identifier */,
[email protected]26a9acf2010-12-13 19:35:0579 string16 /* database name */)
80
[email protected]1f1db252012-02-18 01:04:1481// Sent when a sqlite error indicates the database is corrupt.
82IPC_MESSAGE_CONTROL3(DatabaseHostMsg_HandleSqliteError,
[email protected]5e301592013-06-18 06:36:0583 std::string /* origin identifier */,
[email protected]1f1db252012-02-18 01:04:1484 string16 /* database name */,
85 int /* error */)