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, so no include guard. | 5 // Multiply-included message file, so no include guard. |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/common/indexed_db/indexed_db_key.h" | 12 #include "content/common/indexed_db/indexed_db_key.h" |
| 13 #include "content/common/indexed_db/indexed_db_key_path.h" |
13 #include "content/common/indexed_db/indexed_db_param_traits.h" | 14 #include "content/common/indexed_db/indexed_db_param_traits.h" |
14 #include "content/public/common/common_param_traits.h" | 15 #include "content/public/common/common_param_traits.h" |
15 #include "content/public/common/serialized_script_value.h" | 16 #include "content/public/common/serialized_script_value.h" |
16 #include "ipc/ipc_message_macros.h" | 17 #include "ipc/ipc_message_macros.h" |
17 #include "webkit/plugins/webplugininfo.h" | 18 #include "webkit/plugins/webplugininfo.h" |
18 | 19 |
19 #undef IPC_MESSAGE_EXPORT | 20 #undef IPC_MESSAGE_EXPORT |
20 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
21 #define IPC_MESSAGE_START UtilityMsgStart | 22 #define IPC_MESSAGE_START UtilityMsgStart |
22 | 23 |
23 //------------------------------------------------------------------------------ | 24 //------------------------------------------------------------------------------ |
24 // Utility process messages: | 25 // Utility process messages: |
25 // These are messages from the browser to the utility process. | 26 // These are messages from the browser to the utility process. |
26 | 27 |
27 // Tell the utility process to extract the given IDBKeyPath from the | 28 // Tell the utility process to extract the given IDBKeyPath from the |
28 // SerializedScriptValue vector and reply with the corresponding IDBKeys. | 29 // SerializedScriptValue vector and reply with the corresponding IDBKeys. |
29 IPC_MESSAGE_CONTROL3(UtilityMsg_IDBKeysFromValuesAndKeyPath, | 30 IPC_MESSAGE_CONTROL3(UtilityMsg_IDBKeysFromValuesAndKeyPath, |
30 int, // id | 31 int, // id |
31 std::vector<content::SerializedScriptValue>, | 32 std::vector<content::SerializedScriptValue>, |
32 string16) // IDBKeyPath | 33 content::IndexedDBKeyPath) |
33 | 34 |
34 IPC_MESSAGE_CONTROL3(UtilityMsg_InjectIDBKey, | 35 IPC_MESSAGE_CONTROL3(UtilityMsg_InjectIDBKey, |
35 IndexedDBKey /* key */, | 36 IndexedDBKey /* key */, |
36 content::SerializedScriptValue /* value */, | 37 content::SerializedScriptValue /* value */, |
37 string16 /* key path*/) | 38 content::IndexedDBKeyPath) |
38 | 39 |
39 // Tells the utility process that it's running in batch mode. | 40 // Tells the utility process that it's running in batch mode. |
40 IPC_MESSAGE_CONTROL0(UtilityMsg_BatchMode_Started) | 41 IPC_MESSAGE_CONTROL0(UtilityMsg_BatchMode_Started) |
41 | 42 |
42 // Tells the utility process that it can shutdown. | 43 // Tells the utility process that it can shutdown. |
43 IPC_MESSAGE_CONTROL0(UtilityMsg_BatchMode_Finished) | 44 IPC_MESSAGE_CONTROL0(UtilityMsg_BatchMode_Finished) |
44 | 45 |
45 #if defined(OS_POSIX) | 46 #if defined(OS_POSIX) |
46 // Tells the utility process to load each plugin in the order specified by the | 47 // Tells the utility process to load each plugin in the order specified by the |
47 // vector. It will respond after each load with the WebPluginInfo. | 48 // vector. It will respond after each load with the WebPluginInfo. |
48 IPC_MESSAGE_CONTROL1(UtilityMsg_LoadPlugins, | 49 IPC_MESSAGE_CONTROL1(UtilityMsg_LoadPlugins, |
49 std::vector<FilePath> /* plugin paths */) | 50 std::vector<FilePath> /* plugin paths */) |
50 #endif | 51 #endif |
51 | 52 |
52 //------------------------------------------------------------------------------ | 53 //------------------------------------------------------------------------------ |
53 // Utility process host messages: | 54 // Utility process host messages: |
54 // These are messages from the utility process to the browser. | 55 // These are messages from the utility process to the browser. |
55 | 56 |
56 // Reply when the utility process has succeeded in obtaining the value for | 57 // Reply when the utility process has succeeded in obtaining the value for |
57 // IDBKeyPath. | 58 // IDBKeyPath. |
58 IPC_MESSAGE_CONTROL2(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Succeeded, | 59 IPC_MESSAGE_CONTROL2(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Succeeded, |
59 int /* id */, | 60 int /* id */, |
60 std::vector<IndexedDBKey> /* value */) | 61 std::vector<IndexedDBKey> /* value */) |
61 | 62 |
62 // Reply when the utility process has failed in obtaining the value for | |
63 // IDBKeyPath. | |
64 IPC_MESSAGE_CONTROL1(UtilityHostMsg_IDBKeysFromValuesAndKeyPath_Failed, | |
65 int /* id */) | |
66 | |
67 // Reply when the utility process has finished injecting an IDBKey into | 63 // Reply when the utility process has finished injecting an IDBKey into |
68 // a SerializedScriptValue. | 64 // a SerializedScriptValue. |
69 IPC_MESSAGE_CONTROL1(UtilityHostMsg_InjectIDBKey_Finished, | 65 IPC_MESSAGE_CONTROL1(UtilityHostMsg_InjectIDBKey_Finished, |
70 content::SerializedScriptValue /* new value */) | 66 content::SerializedScriptValue /* new value */) |
71 | 67 |
72 #if defined(OS_POSIX) | 68 #if defined(OS_POSIX) |
73 // Notifies the browser when a plugin failed to load so the two processes can | 69 // Notifies the browser when a plugin failed to load so the two processes can |
74 // keep the canonical list in sync. | 70 // keep the canonical list in sync. |
75 IPC_SYNC_MESSAGE_CONTROL2_0(UtilityHostMsg_LoadPluginFailed, | 71 IPC_SYNC_MESSAGE_CONTROL2_0(UtilityHostMsg_LoadPluginFailed, |
76 uint32_t /* index in the vector */, | 72 uint32_t /* index in the vector */, |
77 FilePath /* path of plugin */) | 73 FilePath /* path of plugin */) |
78 | 74 |
79 // Notifies the browser that a plugin in the vector sent by it has been loaded. | 75 // Notifies the browser that a plugin in the vector sent by it has been loaded. |
80 IPC_SYNC_MESSAGE_CONTROL2_0(UtilityHostMsg_LoadedPlugin, | 76 IPC_SYNC_MESSAGE_CONTROL2_0(UtilityHostMsg_LoadedPlugin, |
81 uint32_t /* index in the vector */, | 77 uint32_t /* index in the vector */, |
82 webkit::WebPluginInfo /* plugin info */) | 78 webkit::WebPluginInfo /* plugin info */) |
83 #endif // OS_POSIX | 79 #endif // OS_POSIX |
OLD | NEW |