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