| 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 text-check results from the Spelling service when the service finishes | 32 // Sends text-check results from the Spelling service when the service finishes |
| 33 // checking text received by a SpellCheckHostMsg_CallSpellingService message. | 33 // checking text received by a SpellCheckHostMsg_CallSpellingService message. |
| 34 // 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 |
| 35 // 5th parameter should contain the requested sentence. | 35 // 5th parameter should contain the requested sentence. |
| 36 IPC_MESSAGE_ROUTED4(SpellCheckMsg_RespondSpellingService, | 36 IPC_MESSAGE_ROUTED4(SpellCheckMsg_RespondSpellingService, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 #if BUILDFLAG(HAS_SPELLCHECK_PANEL) | 103 #if BUILDFLAG(HAS_SPELLCHECK_PANEL) |
| 104 // Tells the browser to display or not display the SpellingPanel | 104 // Tells the browser to display or not display the SpellingPanel |
| 105 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_ShowSpellingPanel, | 105 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_ShowSpellingPanel, |
| 106 bool /* if true, then show it, otherwise hide it*/) | 106 bool /* if true, then show it, otherwise hide it*/) |
| 107 | 107 |
| 108 // 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. |
| 109 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord, | 109 IPC_MESSAGE_ROUTED1(SpellCheckHostMsg_UpdateSpellingPanelWithMisspelledWord, |
| 110 base::string16 /* the word to update the panel with */) | 110 base::string16 /* the word to update the panel with */) |
| 111 #endif | 111 #endif |
| OLD | NEW |