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 // IPC messages for spellcheck. | 5 // IPC messages for spellcheck. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include "chrome/common/spellcheck_marker.h" | 8 #include "chrome/common/spellcheck_marker.h" |
9 #include "chrome/common/spellcheck_result.h" | 9 #include "chrome/common/spellcheck_result.h" |
10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
11 #include "ipc/ipc_platform_file.h" | 11 #include "ipc/ipc_platform_file.h" |
12 | 12 |
13 | 13 |
14 #define IPC_MESSAGE_START SpellCheckMsgStart | 14 #define IPC_MESSAGE_START SpellCheckMsgStart |
15 | 15 |
16 IPC_ENUM_TRAITS(SpellCheckResult::Type) | 16 IPC_ENUM_TRAITS(SpellCheckResult::Type) |
17 | 17 |
18 IPC_STRUCT_TRAITS_BEGIN(SpellCheckResult) | 18 IPC_STRUCT_TRAITS_BEGIN(SpellCheckResult) |
19 IPC_STRUCT_TRAITS_MEMBER(type) | 19 IPC_STRUCT_TRAITS_MEMBER(type) |
20 IPC_STRUCT_TRAITS_MEMBER(location) | 20 IPC_STRUCT_TRAITS_MEMBER(location) |
21 IPC_STRUCT_TRAITS_MEMBER(length) | 21 IPC_STRUCT_TRAITS_MEMBER(length) |
22 IPC_STRUCT_TRAITS_MEMBER(replacement) | 22 IPC_STRUCT_TRAITS_MEMBER(replacement) |
23 IPC_STRUCT_TRAITS_MEMBER(hash) | 23 IPC_STRUCT_TRAITS_MEMBER(hash) |
24 IPC_STRUCT_TRAITS_END() | 24 IPC_STRUCT_TRAITS_END() |
25 | 25 |
26 IPC_STRUCT_TRAITS_BEGIN(SpellCheckMarker) | 26 IPC_STRUCT_TRAITS_BEGIN(SpellCheckMarker) |
27 IPC_STRUCT_TRAITS_MEMBER(hash) | 27 IPC_STRUCT_TRAITS_MEMBER(hash) |
28 IPC_STRUCT_TRAITS_MEMBER(offset) | 28 IPC_STRUCT_TRAITS_MEMBER(offset) |
jln (very slow on Chromium)
2013/05/28 23:24:52
Offset here seems dangerous!
| |
29 IPC_STRUCT_TRAITS_END() | 29 IPC_STRUCT_TRAITS_END() |
30 | 30 |
31 // Messages sent from the browser to the renderer. | 31 // Messages sent from the browser to the renderer. |
32 | 32 |
33 IPC_MESSAGE_CONTROL1(SpellCheckMsg_EnableSpellCheck, | 33 IPC_MESSAGE_CONTROL1(SpellCheckMsg_EnableSpellCheck, |
34 bool) | 34 bool) |
35 | 35 |
36 // Passes some initialization params to the renderer's spellchecker. This can | 36 // Passes some initialization params to the renderer's spellchecker. This can |
37 // be called directly after startup or in (async) response to a | 37 // be called directly after startup or in (async) response to a |
38 // RequestDictionary ViewHost message. | 38 // RequestDictionary ViewHost message. |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 // TODO(groby): This needs to originate from SpellcheckProvider. | 123 // TODO(groby): This needs to originate from SpellcheckProvider. |
124 IPC_SYNC_MESSAGE_CONTROL2_1(SpellCheckHostMsg_CheckSpelling, | 124 IPC_SYNC_MESSAGE_CONTROL2_1(SpellCheckHostMsg_CheckSpelling, |
125 string16 /* word */, | 125 string16 /* word */, |
126 int /* route_id */, | 126 int /* route_id */, |
127 bool /* correct */) | 127 bool /* correct */) |
128 | 128 |
129 IPC_SYNC_MESSAGE_CONTROL1_1(SpellCheckHostMsg_FillSuggestionList, | 129 IPC_SYNC_MESSAGE_CONTROL1_1(SpellCheckHostMsg_FillSuggestionList, |
130 string16 /* word */, | 130 string16 /* word */, |
131 std::vector<string16> /* suggestions */) | 131 std::vector<string16> /* suggestions */) |
132 | 132 |
133 IPC_MESSAGE_CONTROL3(SpellCheckHostMsg_RequestTextCheck, | 133 IPC_MESSAGE_CONTROL4(SpellCheckHostMsg_RequestTextCheck, |
134 int /* route_id for response */, | 134 int /* route_id for response */, |
135 int /* request identifier given by WebKit */, | 135 int /* request identifier given by WebKit */, |
136 string16 /* sentence */) | 136 string16 /* sentence */, |
137 std::vector<SpellCheckMarker> /* markers */) | |
137 | 138 |
138 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_ToggleSpellCheck, | 139 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_ToggleSpellCheck, |
139 bool /* enabled */, | 140 bool /* enabled */, |
140 bool /* checked */) | 141 bool /* checked */) |
141 #endif // OS_MACOSX | 142 #endif // OS_MACOSX |
OLD | NEW |