| 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" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // feedback sender. | 60 // feedback sender. |
| 61 IPC_MESSAGE_CONTROL1(SpellCheckHostMsg_RespondDocumentMarkers, | 61 IPC_MESSAGE_CONTROL1(SpellCheckHostMsg_RespondDocumentMarkers, |
| 62 std::vector<uint32> /* document marker identifiers */) | 62 std::vector<uint32> /* document marker identifiers */) |
| 63 | 63 |
| 64 #if !defined(OS_MACOSX) | 64 #if !defined(OS_MACOSX) |
| 65 // Sends text-check results from the Spelling service when the service finishes | 65 // Sends text-check results from the Spelling service when the service finishes |
| 66 // checking text received by a SpellCheckHostMsg_CallSpellingService message. | 66 // checking text received by a SpellCheckHostMsg_CallSpellingService message. |
| 67 // If the service is not available, the 4th parameter should be false and the | 67 // If the service is not available, the 4th parameter should be false and the |
| 68 // 5th parameter should contain the requested sentence. | 68 // 5th parameter should contain the requested sentence. |
| 69 IPC_MESSAGE_ROUTED4(SpellCheckMsg_RespondSpellingService, | 69 IPC_MESSAGE_ROUTED4(SpellCheckMsg_RespondSpellingService, |
| 70 int /* request identifier given by WebKit */, | 70 int /* request identifier given by WebKit */, |
| 71 bool /* succeeded calling service */, | 71 bool /* succeeded calling service */, |
| 72 string16 /* sentence */, | 72 base::string16 /* sentence */, |
| 73 std::vector<SpellCheckResult>) | 73 std::vector<SpellCheckResult>) |
| 74 #endif | 74 #endif |
| 75 | 75 |
| 76 #if defined(OS_MACOSX) | 76 #if defined(OS_MACOSX) |
| 77 // This message tells the renderer to advance to the next misspelling. It is | 77 // This message tells the renderer to advance to the next misspelling. It is |
| 78 // sent when the user clicks the "Find Next" button on the spelling panel. | 78 // sent when the user clicks the "Find Next" button on the spelling panel. |
| 79 IPC_MESSAGE_ROUTED0(SpellCheckMsg_AdvanceToNextMisspelling) | 79 IPC_MESSAGE_ROUTED0(SpellCheckMsg_AdvanceToNextMisspelling) |
| 80 | 80 |
| 81 // Sends when NSSpellChecker finishes checking text received by a preceding | 81 // Sends when NSSpellChecker finishes checking text received by a preceding |
| 82 // SpellCheckHostMsg_RequestTextCheck message. | 82 // SpellCheckHostMsg_RequestTextCheck message. |
| 83 IPC_MESSAGE_ROUTED2(SpellCheckMsg_RespondTextCheck, | 83 IPC_MESSAGE_ROUTED2(SpellCheckMsg_RespondTextCheck, |
| 84 int /* request identifier given by WebKit */, | 84 int /* request identifier given by WebKit */, |
| 85 std::vector<SpellCheckResult>) | 85 std::vector<SpellCheckResult>) |
| 86 | 86 |
| 87 IPC_MESSAGE_ROUTED1(SpellCheckMsg_ToggleSpellPanel, | 87 IPC_MESSAGE_ROUTED1(SpellCheckMsg_ToggleSpellPanel, |
| 88 bool) | 88 bool) |
| 89 #endif | 89 #endif |
| 90 | 90 |
| 91 // Messages sent from the renderer to the browser. | 91 // Messages sent from the renderer to the browser. |
| 92 | 92 |
| 93 // The renderer has tried to spell check a word, but couldn't because no | 93 // The renderer has tried to spell check a word, but couldn't because no |
| 94 // dictionary was available to load. Request that the browser find an | 94 // dictionary was available to load. Request that the browser find an |
| 95 // appropriate dictionary and return it. | 95 // appropriate dictionary and return it. |
| 96 IPC_MESSAGE_CONTROL0(SpellCheckHostMsg_RequestDictionary) | 96 IPC_MESSAGE_CONTROL0(SpellCheckHostMsg_RequestDictionary) |
| 97 | 97 |
| 98 // Tracks spell checking occurrence to collect histogram. | 98 // Tracks spell checking occurrence to collect histogram. |
| 99 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_NotifyChecked, | 99 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_NotifyChecked, |
| 100 string16 /* word */, | 100 base::string16 /* word */, |
| 101 bool /* true if checked word is misspelled */) | 101 bool /* true if checked word is misspelled */) |
| 102 | 102 |
| 103 #if !defined(OS_MACOSX) | 103 #if !defined(OS_MACOSX) |
| 104 // Asks the Spelling service to check text. When the service finishes checking | 104 // Asks the Spelling service to check text. When the service finishes checking |
| 105 // the input text, it sends a SpellingCheckMsg_RespondSpellingService with | 105 // the input text, it sends a SpellingCheckMsg_RespondSpellingService with |
| 106 // text-check results. | 106 // text-check results. |
| 107 IPC_MESSAGE_CONTROL4(SpellCheckHostMsg_CallSpellingService, | 107 IPC_MESSAGE_CONTROL4(SpellCheckHostMsg_CallSpellingService, |
| 108 int /* route_id for response */, | 108 int /* route_id for response */, |
| 109 int /* request identifier given by WebKit */, | 109 int /* request identifier given by WebKit */, |
| 110 string16 /* sentence */, | 110 base::string16 /* sentence */, |
| 111 std::vector<SpellCheckMarker> /* markers */) | 111 std::vector<SpellCheckMarker> /* markers */) |
| 112 #endif | 112 #endif |
| 113 | 113 |
| 114 #if defined(OS_MACOSX) | 114 #if defined(OS_MACOSX) |
| 115 // Tells the browser to display or not display the SpellingPanel | 115 // Tells the browser to display or not display the SpellingPanel |
| 116 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_ShowSpellingPanel, | 116 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_ShowSpellingPanel, |
| 117 bool /* if true, then show it, otherwise hide it*/) | 117 bool /* if true, then show it, otherwise hide it*/) |
| 118 | 118 |
| 119 // Tells the browser to update the spelling panel with the given word. | 119 // Tells the browser to update the spelling panel with the given word. |
| 120 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord, | 120 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord, |
| 121 string16 /* the word to update the panel with */) | 121 base::string16 /* the word to update the panel with */) |
| 122 | 122 |
| 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 base::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 base::string16 /* word */, |
| 131 std::vector<string16> /* suggestions */) | 131 std::vector<base::string16> /* suggestions */) |
| 132 | 132 |
| 133 IPC_MESSAGE_CONTROL4(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 base::string16 /* sentence */, |
| 137 std::vector<SpellCheckMarker> /* markers */) | 137 std::vector<SpellCheckMarker> /* markers */) |
| 138 | 138 |
| 139 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_ToggleSpellCheck, | 139 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_ToggleSpellCheck, |
| 140 bool /* enabled */, | 140 bool /* enabled */, |
| 141 bool /* checked */) | 141 bool /* checked */) |
| 142 #endif // OS_MACOSX | 142 #endif // OS_MACOSX |
| OLD | NEW |