Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: chrome/common/spellcheck_messages.h

Issue 1210943008: Patch 2: Added a preprocessor flag for platform spellcheck. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@enable_spellcheck_flag
Patch Set: Added a preprocessor flag for Android spellcheck. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 #else
78
79 #if defined(OS_MACOSX)
80 // This message tells the renderer to advance to the next misspelling. It is 78 // 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. 79 // sent when the user clicks the "Find Next" button on the spelling panel.
82 IPC_MESSAGE_ROUTED0(SpellCheckMsg_AdvanceToNextMisspelling) 80 IPC_MESSAGE_ROUTED0(SpellCheckMsg_AdvanceToNextMisspelling)
83 81
84 // Sends when NSSpellChecker finishes checking text received by a preceding 82 // Sends when NSSpellChecker finishes checking text received by a preceding
85 // SpellCheckHostMsg_RequestTextCheck message. 83 // SpellCheckHostMsg_RequestTextCheck message.
86 IPC_MESSAGE_ROUTED2(SpellCheckMsg_RespondTextCheck, 84 IPC_MESSAGE_ROUTED2(SpellCheckMsg_RespondTextCheck,
87 int /* request identifier given by WebKit */, 85 int /* request identifier given by WebKit */,
88 std::vector<SpellCheckResult>) 86 std::vector<SpellCheckResult>)
89 87
90 IPC_MESSAGE_ROUTED1(SpellCheckMsg_ToggleSpellPanel, 88 IPC_MESSAGE_ROUTED1(SpellCheckMsg_ToggleSpellPanel,
91 bool) 89 bool)
92 #endif 90 #endif // USE_PLATFORM_SPELLCHECKER
93 91
94 // Messages sent from the renderer to the browser. 92 // Messages sent from the renderer to the browser.
95 93
96 // The renderer has tried to spell check a word, but couldn't because no 94 // 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 95 // dictionary was available to load. Request that the browser find an
98 // appropriate dictionary and return it. 96 // appropriate dictionary and return it.
99 IPC_MESSAGE_CONTROL0(SpellCheckHostMsg_RequestDictionary) 97 IPC_MESSAGE_CONTROL0(SpellCheckHostMsg_RequestDictionary)
100 98
101 // Tracks spell checking occurrence to collect histogram. 99 // Tracks spell checking occurrence to collect histogram.
102 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_NotifyChecked, 100 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_NotifyChecked,
103 base::string16 /* word */, 101 base::string16 /* word */,
104 bool /* true if checked word is misspelled */) 102 bool /* true if checked word is misspelled */)
105 103
106 #if !defined(OS_MACOSX) 104 #if !defined(USE_PLATFORM_SPELLCHECKER)
107 // Asks the Spelling service to check text. When the service finishes checking 105 // Asks the Spelling service to check text. When the service finishes checking
108 // the input text, it sends a SpellingCheckMsg_RespondSpellingService with 106 // the input text, it sends a SpellingCheckMsg_RespondSpellingService with
109 // text-check results. 107 // text-check results.
110 IPC_MESSAGE_CONTROL4(SpellCheckHostMsg_CallSpellingService, 108 IPC_MESSAGE_CONTROL4(SpellCheckHostMsg_CallSpellingService,
111 int /* route_id for response */, 109 int /* route_id for response */,
112 int /* request identifier given by WebKit */, 110 int /* request identifier given by WebKit */,
113 base::string16 /* sentence */, 111 base::string16 /* sentence */,
114 std::vector<SpellCheckMarker> /* markers */) 112 std::vector<SpellCheckMarker> /* markers */)
115 #endif 113 #else
116
117 #if defined(OS_MACOSX)
118 // Tells the browser to display or not display the SpellingPanel 114 // Tells the browser to display or not display the SpellingPanel
119 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_ShowSpellingPanel, 115 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_ShowSpellingPanel,
120 bool /* if true, then show it, otherwise hide it*/) 116 bool /* if true, then show it, otherwise hide it*/)
121 117
122 // Tells the browser to update the spelling panel with the given word. 118 // Tells the browser to update the spelling panel with the given word.
123 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord, 119 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord,
124 base::string16 /* the word to update the panel with */) 120 base::string16 /* the word to update the panel with */)
125 121
126 // TODO(groby): This needs to originate from SpellcheckProvider. 122 // TODO(groby): This needs to originate from SpellcheckProvider.
127 IPC_SYNC_MESSAGE_CONTROL2_1(SpellCheckHostMsg_CheckSpelling, 123 IPC_SYNC_MESSAGE_CONTROL2_1(SpellCheckHostMsg_CheckSpelling,
128 base::string16 /* word */, 124 base::string16 /* word */,
129 int /* route_id */, 125 int /* route_id */,
130 bool /* correct */) 126 bool /* correct */)
131 127
132 IPC_SYNC_MESSAGE_CONTROL1_1(SpellCheckHostMsg_FillSuggestionList, 128 IPC_SYNC_MESSAGE_CONTROL1_1(SpellCheckHostMsg_FillSuggestionList,
133 base::string16 /* word */, 129 base::string16 /* word */,
134 std::vector<base::string16> /* suggestions */) 130 std::vector<base::string16> /* suggestions */)
135 131
136 IPC_MESSAGE_CONTROL4(SpellCheckHostMsg_RequestTextCheck, 132 IPC_MESSAGE_CONTROL4(SpellCheckHostMsg_RequestTextCheck,
137 int /* route_id for response */, 133 int /* route_id for response */,
138 int /* request identifier given by WebKit */, 134 int /* request identifier given by WebKit */,
139 base::string16 /* sentence */, 135 base::string16 /* sentence */,
140 std::vector<SpellCheckMarker> /* markers */) 136 std::vector<SpellCheckMarker> /* markers */)
141 137
142 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_ToggleSpellCheck, 138 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_ToggleSpellCheck,
143 bool /* enabled */, 139 bool /* enabled */,
144 bool /* checked */) 140 bool /* checked */)
145 #endif // OS_MACOSX 141 #endif // USE_PLATFORM_SPELLCHECKER
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698