| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "components/spellcheck/common/spellcheck_result.h" | 10 #include "components/spellcheck/common/spellcheck_result.h" |
| 11 #include "components/spellcheck/spellcheck_build_features.h" | 11 #include "components/spellcheck/spellcheck_build_features.h" |
| 12 #include "ipc/ipc_message_macros.h" | 12 #include "ipc/ipc_message_macros.h" |
| 13 | 13 |
| 14 #if !BUILDFLAG(ENABLE_SPELLCHECK) | 14 #if !BUILDFLAG(ENABLE_SPELLCHECK) |
| 15 #error "Spellcheck should be enabled." | 15 #error "Spellcheck should be enabled." |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 #define IPC_MESSAGE_START SpellCheckMsgStart | 18 #define IPC_MESSAGE_START SpellCheckMsgStart |
| 19 | 19 |
| 20 IPC_ENUM_TRAITS(SpellCheckResult::Decoration) | 20 IPC_ENUM_TRAITS(SpellCheckResult::Decoration) |
| 21 | 21 |
| 22 IPC_STRUCT_TRAITS_BEGIN(SpellCheckResult) | 22 IPC_STRUCT_TRAITS_BEGIN(SpellCheckResult) |
| 23 IPC_STRUCT_TRAITS_MEMBER(decoration) | 23 IPC_STRUCT_TRAITS_MEMBER(decoration) |
| 24 IPC_STRUCT_TRAITS_MEMBER(location) | 24 IPC_STRUCT_TRAITS_MEMBER(location) |
| 25 IPC_STRUCT_TRAITS_MEMBER(length) | 25 IPC_STRUCT_TRAITS_MEMBER(length) |
| 26 IPC_STRUCT_TRAITS_MEMBER(replacement) | 26 IPC_STRUCT_TRAITS_MEMBER(replacements) |
| 27 IPC_STRUCT_TRAITS_END() | 27 IPC_STRUCT_TRAITS_END() |
| 28 | 28 |
| 29 // Messages sent from the browser to the renderer. | 29 // Messages sent from the browser to the renderer. |
| 30 | 30 |
| 31 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) | 31 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) |
| 32 // Sends when NSSpellChecker finishes checking text received by a preceding | 32 // Sends when NSSpellChecker finishes checking text received by a preceding |
| 33 // SpellCheckHostMsg_RequestTextCheck message. | 33 // SpellCheckHostMsg_RequestTextCheck message. |
| 34 IPC_MESSAGE_ROUTED3(SpellCheckMsg_RespondTextCheck, | 34 IPC_MESSAGE_ROUTED3(SpellCheckMsg_RespondTextCheck, |
| 35 int /* request identifier given by WebKit */, | 35 int /* request identifier given by WebKit */, |
| 36 base::string16 /* sentence */, | 36 base::string16 /* sentence */, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 #if BUILDFLAG(HAS_SPELLCHECK_PANEL) | 71 #if BUILDFLAG(HAS_SPELLCHECK_PANEL) |
| 72 // Tells the browser to display or not display the SpellingPanel | 72 // Tells the browser to display or not display the SpellingPanel |
| 73 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_ShowSpellingPanel, | 73 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_ShowSpellingPanel, |
| 74 bool /* if true, then show it, otherwise hide it*/) | 74 bool /* if true, then show it, otherwise hide it*/) |
| 75 | 75 |
| 76 // Tells the browser to update the spelling panel with the given word. | 76 // Tells the browser to update the spelling panel with the given word. |
| 77 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord, | 77 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord, |
| 78 base::string16 /* the word to update the panel with */) | 78 base::string16 /* the word to update the panel with */) |
| 79 #endif | 79 #endif |
| OLD | NEW |