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

Side by Side Diff: components/spellcheck/common/spellcheck_messages.h

Issue 2828313002: Convert render process component common Spellcheck IPC to mojo (Closed)
Patch Set: Build fix. Created 3 years, 7 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include "components/spellcheck/common/spellcheck_bdict_language.h"
11 #include "components/spellcheck/common/spellcheck_result.h" 10 #include "components/spellcheck/common/spellcheck_result.h"
12 #include "components/spellcheck/spellcheck_build_features.h" 11 #include "components/spellcheck/spellcheck_build_features.h"
13 #include "ipc/ipc_message_macros.h" 12 #include "ipc/ipc_message_macros.h"
14 #include "ipc/ipc_platform_file.h"
15 13
16 #if !BUILDFLAG(ENABLE_SPELLCHECK) 14 #if !BUILDFLAG(ENABLE_SPELLCHECK)
17 #error "Spellcheck should be enabled" 15 #error "Spellcheck should be enabled"
18 #endif 16 #endif
19 17
20 #define IPC_MESSAGE_START SpellCheckMsgStart 18 #define IPC_MESSAGE_START SpellCheckMsgStart
21 19
22 IPC_ENUM_TRAITS(SpellCheckResult::Decoration) 20 IPC_ENUM_TRAITS(SpellCheckResult::Decoration)
23 21
24 IPC_STRUCT_TRAITS_BEGIN(SpellCheckResult) 22 IPC_STRUCT_TRAITS_BEGIN(SpellCheckResult)
25 IPC_STRUCT_TRAITS_MEMBER(decoration) 23 IPC_STRUCT_TRAITS_MEMBER(decoration)
26 IPC_STRUCT_TRAITS_MEMBER(location) 24 IPC_STRUCT_TRAITS_MEMBER(location)
27 IPC_STRUCT_TRAITS_MEMBER(length) 25 IPC_STRUCT_TRAITS_MEMBER(length)
28 IPC_STRUCT_TRAITS_MEMBER(replacement) 26 IPC_STRUCT_TRAITS_MEMBER(replacement)
29 IPC_STRUCT_TRAITS_END() 27 IPC_STRUCT_TRAITS_END()
30 28
31 IPC_STRUCT_TRAITS_BEGIN(SpellCheckBDictLanguage)
32 IPC_STRUCT_TRAITS_MEMBER(file)
33 IPC_STRUCT_TRAITS_MEMBER(language)
34 IPC_STRUCT_TRAITS_END()
35
36 // Messages sent from the browser to the renderer. 29 // Messages sent from the browser to the renderer.
37 30
38 IPC_MESSAGE_CONTROL1(SpellCheckMsg_EnableSpellCheck, bool)
39
40 // Passes some initialization params from the browser to the renderer's
41 // spellchecker. This can be called directly after startup or in (async)
42 // response to a RequestDictionary ViewHost message.
43 IPC_MESSAGE_CONTROL2(SpellCheckMsg_Init,
44 std::vector<SpellCheckBDictLanguage> /* bdict_languages */,
45 std::set<std::string> /* custom_dict_words */)
46
47 // Words have been added and removed in the custom dictionary; update the local
48 // custom word list.
49 IPC_MESSAGE_CONTROL2(SpellCheckMsg_CustomDictionaryChanged,
50 std::set<std::string> /* words_added */,
51 std::set<std::string> /* words_removed */)
52
53 #if !BUILDFLAG(USE_BROWSER_SPELLCHECKER) 31 #if !BUILDFLAG(USE_BROWSER_SPELLCHECKER)
54 // Sends text-check results from the Spelling service when the service finishes 32 // Sends text-check results from the Spelling service when the service finishes
55 // checking text received by a SpellCheckHostMsg_CallSpellingService message. 33 // checking text received by a SpellCheckHostMsg_CallSpellingService message.
56 // If the service is not available, the 4th parameter should be false and the 34 // If the service is not available, the 4th parameter should be false and the
57 // 5th parameter should contain the requested sentence. 35 // 5th parameter should contain the requested sentence.
58 IPC_MESSAGE_ROUTED4(SpellCheckMsg_RespondSpellingService, 36 IPC_MESSAGE_ROUTED4(SpellCheckMsg_RespondSpellingService,
59 int /* request identifier given by WebKit */, 37 int /* request identifier given by WebKit */,
60 bool /* succeeded calling service */, 38 bool /* succeeded calling service */,
61 base::string16 /* sentence */, 39 base::string16 /* sentence */,
62 std::vector<SpellCheckResult>) 40 std::vector<SpellCheckResult>)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 102
125 #if BUILDFLAG(HAS_SPELLCHECK_PANEL) 103 #if BUILDFLAG(HAS_SPELLCHECK_PANEL)
126 // Tells the browser to display or not display the SpellingPanel 104 // Tells the browser to display or not display the SpellingPanel
127 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_ShowSpellingPanel, 105 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_ShowSpellingPanel,
128 bool /* if true, then show it, otherwise hide it*/) 106 bool /* if true, then show it, otherwise hide it*/)
129 107
130 // Tells the browser to update the spelling panel with the given word. 108 // Tells the browser to update the spelling panel with the given word.
131 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord, 109 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord,
132 base::string16 /* the word to update the panel with */) 110 base::string16 /* the word to update the panel with */)
133 #endif 111 #endif
OLDNEW
« no previous file with comments | « components/spellcheck/common/spellcheck_bdict_language.h ('k') | components/spellcheck/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698