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_result.h" | 8 #include "chrome/common/spellcheck_result.h" |
9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
10 #include "ipc/ipc_platform_file.h" | 10 #include "ipc/ipc_platform_file.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 // Passes some initialization params to the renderer's spellchecker. This can | 29 // Passes some initialization params to the renderer's spellchecker. This can |
30 // be called directly after startup or in (async) response to a | 30 // be called directly after startup or in (async) response to a |
31 // RequestDictionary ViewHost message. | 31 // RequestDictionary ViewHost message. |
32 IPC_MESSAGE_CONTROL4(SpellCheckMsg_Init, | 32 IPC_MESSAGE_CONTROL4(SpellCheckMsg_Init, |
33 IPC::PlatformFileForTransit /* bdict_file */, | 33 IPC::PlatformFileForTransit /* bdict_file */, |
34 std::vector<std::string> /* custom_dict_words */, | 34 std::vector<std::string> /* custom_dict_words */, |
35 std::string /* language */, | 35 std::string /* language */, |
36 bool /* auto spell correct */) | 36 bool /* auto spell correct */) |
37 | 37 |
38 // A word has been added to the custom dictionary; update the local custom | 38 // Words have been added to the custom dictionary; update the local custom |
39 // word list. | 39 // word list. |
40 IPC_MESSAGE_CONTROL1(SpellCheckMsg_WordAdded, | 40 IPC_MESSAGE_CONTROL1(SpellCheckMsg_WordsAdded, |
41 std::string /* word */) | 41 std::vector<std::string> /* words */) |
42 | 42 |
43 // A word has been removed from the custom dictionary; update the local custom | 43 // Words have been removed from the custom dictionary; update the local custom |
44 // word list. | 44 // word list. |
45 IPC_MESSAGE_CONTROL1(SpellCheckMsg_WordRemoved, | 45 IPC_MESSAGE_CONTROL1(SpellCheckMsg_WordsRemoved, |
46 std::string /* word */) | 46 std::vector<std::string> /* words */) |
47 | 47 |
48 // Toggle the auto spell correct functionality. | 48 // Toggle the auto spell correct functionality. |
49 IPC_MESSAGE_CONTROL1(SpellCheckMsg_EnableAutoSpellCorrect, | 49 IPC_MESSAGE_CONTROL1(SpellCheckMsg_EnableAutoSpellCorrect, |
50 bool /* enable */) | 50 bool /* enable */) |
51 | 51 |
52 #if !defined(OS_MACOSX) | 52 #if !defined(OS_MACOSX) |
53 // Sends text-check results from the Spelling service when the service finishes | 53 // Sends text-check results from the Spelling service when the service finishes |
54 // checking text reveived by a SpellCheckHostMsg_CallSpellingService message. | 54 // checking text revived by a SpellCheckHostMsg_CallSpellingService message. |
55 // If the service is not available, the 4th parameter should be false and | 55 // If the service is not available, the 4th parameter should be false and |
56 // the 5th parameter should contain the requested sentence. | 56 // the 5th parameter should contain the requested sentence. |
57 IPC_MESSAGE_ROUTED5(SpellCheckMsg_RespondSpellingService, | 57 IPC_MESSAGE_ROUTED5(SpellCheckMsg_RespondSpellingService, |
58 int /* request identifier given by WebKit */, | 58 int /* request identifier given by WebKit */, |
59 int /* offset */, | 59 int /* offset */, |
60 bool /* succeeded calling serivce */, | 60 bool /* succeeded calling service */, |
61 string16 /* sentence */, | 61 string16 /* sentence */, |
62 std::vector<SpellCheckResult>) | 62 std::vector<SpellCheckResult>) |
63 #endif | 63 #endif |
64 | 64 |
65 #if defined(OS_MACOSX) | 65 #if defined(OS_MACOSX) |
66 // This message tells the renderer to advance to the next misspelling. It is | 66 // This message tells the renderer to advance to the next misspelling. It is |
67 // sent when the user clicks the "Find Next" button on the spelling panel. | 67 // sent when the user clicks the "Find Next" button on the spelling panel. |
68 IPC_MESSAGE_ROUTED0(SpellCheckMsg_AdvanceToNextMisspelling) | 68 IPC_MESSAGE_ROUTED0(SpellCheckMsg_AdvanceToNextMisspelling) |
69 | 69 |
70 // Sends when NSSpellChecker finishes checking text received by a preceeding | 70 // Sends when NSSpellChecker finishes checking text received by a preceding |
71 // SpellCheckHostMsg_RequestTextCheck message. | 71 // SpellCheckHostMsg_RequestTextCheck message. |
72 IPC_MESSAGE_ROUTED2(SpellCheckMsg_RespondTextCheck, | 72 IPC_MESSAGE_ROUTED2(SpellCheckMsg_RespondTextCheck, |
73 int /* request identifier given by WebKit */, | 73 int /* request identifier given by WebKit */, |
74 std::vector<SpellCheckResult>) | 74 std::vector<SpellCheckResult>) |
75 | 75 |
76 IPC_MESSAGE_ROUTED1(SpellCheckMsg_ToggleSpellPanel, | 76 IPC_MESSAGE_ROUTED1(SpellCheckMsg_ToggleSpellPanel, |
77 bool) | 77 bool) |
78 #endif | 78 #endif |
79 | 79 |
80 // Messages sent from the renderer to the browser. | 80 // Messages sent from the renderer to the browser. |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 126 |
127 IPC_MESSAGE_CONTROL3(SpellCheckHostMsg_RequestTextCheck, | 127 IPC_MESSAGE_CONTROL3(SpellCheckHostMsg_RequestTextCheck, |
128 int /* route_id for response */, | 128 int /* route_id for response */, |
129 int /* request identifier given by WebKit */, | 129 int /* request identifier given by WebKit */, |
130 string16 /* sentence */) | 130 string16 /* sentence */) |
131 | 131 |
132 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_ToggleSpellCheck, | 132 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_ToggleSpellCheck, |
133 bool /* enabled */, | 133 bool /* enabled */, |
134 bool /* checked */) | 134 bool /* checked */) |
135 #endif // OS_MACOSX | 135 #endif // OS_MACOSX |
OLD | NEW |