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