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

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

Issue 11476005: [Spellcheck] Make sure context menu and actual spellcheck state are in sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 8 years 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 | Annotate | Revision Log
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_result.h" 8 #include "chrome/common/spellcheck_result.h"
9 #include "ipc/ipc_message_macros.h" 9 #include "ipc/ipc_message_macros.h"
10 #include "ipc/ipc_platform_file.h" 10 #include "ipc/ipc_platform_file.h"
11 11
12 12
13 #define IPC_MESSAGE_START SpellCheckMsgStart 13 #define IPC_MESSAGE_START SpellCheckMsgStart
14 14
15 IPC_ENUM_TRAITS(SpellCheckResult::Type) 15 IPC_ENUM_TRAITS(SpellCheckResult::Type)
16 16
17 IPC_STRUCT_TRAITS_BEGIN(SpellCheckResult) 17 IPC_STRUCT_TRAITS_BEGIN(SpellCheckResult)
18 IPC_STRUCT_TRAITS_MEMBER(type) 18 IPC_STRUCT_TRAITS_MEMBER(type)
19 IPC_STRUCT_TRAITS_MEMBER(location) 19 IPC_STRUCT_TRAITS_MEMBER(location)
20 IPC_STRUCT_TRAITS_MEMBER(length) 20 IPC_STRUCT_TRAITS_MEMBER(length)
21 IPC_STRUCT_TRAITS_MEMBER(replacement) 21 IPC_STRUCT_TRAITS_MEMBER(replacement)
22 IPC_STRUCT_TRAITS_END() 22 IPC_STRUCT_TRAITS_END()
23 23
24 // Messages sent from the browser to the renderer. 24 // Messages sent from the browser to the renderer.
25 25
26 IPC_MESSAGE_ROUTED0(SpellCheckMsg_ToggleSpellCheck) 26 IPC_MESSAGE_CONTROL1(SpellCheckMsg_EnableSpellCheck,
27 bool)
27 28
28 // Passes some initialization params to the renderer's spellchecker. This can 29 // Passes some initialization params to the renderer's spellchecker. This can
29 // be called directly after startup or in (async) response to a 30 // be called directly after startup or in (async) response to a
30 // RequestDictionary ViewHost message. 31 // RequestDictionary ViewHost message.
31 IPC_MESSAGE_CONTROL4(SpellCheckMsg_Init, 32 IPC_MESSAGE_CONTROL4(SpellCheckMsg_Init,
32 IPC::PlatformFileForTransit /* bdict_file */, 33 IPC::PlatformFileForTransit /* bdict_file */,
33 std::vector<std::string> /* custom_dict_words */, 34 std::vector<std::string> /* custom_dict_words */,
34 std::string /* language */, 35 std::string /* language */,
35 bool /* auto spell correct */) 36 bool /* auto spell correct */)
36 37
37 // A word has been added to the custom dictionary; update the local custom 38 // A word has been added to the custom dictionary; update the local custom
38 // word list. 39 // word list.
39 IPC_MESSAGE_CONTROL1(SpellCheckMsg_WordAdded, 40 IPC_MESSAGE_CONTROL1(SpellCheckMsg_WordAdded,
40 std::string /* word */) 41 std::string /* word */)
41 42
42 // A word has been removed from the custom dictionary; update the local custom 43 // A word has been removed from the custom dictionary; update the local custom
43 // word list. 44 // word list.
44 IPC_MESSAGE_CONTROL1(SpellCheckMsg_WordRemoved, 45 IPC_MESSAGE_CONTROL1(SpellCheckMsg_WordRemoved,
45 std::string /* word */) 46 std::string /* word */)
46 47
47 // Toggle the auto spell correct functionality. 48 // Toggle the auto spell correct functionality.
48 IPC_MESSAGE_CONTROL1(SpellCheckMsg_EnableAutoSpellCorrect, 49 IPC_MESSAGE_CONTROL1(SpellCheckMsg_EnableAutoSpellCorrect,
49 bool /* enable */) 50 bool /* enable */)
50 51
51 #if !defined(OS_MACOSX) 52 #if !defined(OS_MACOSX)
52 // Sends text-check results from the Spelling service when the service finishes 53 // Sends text-check results from the Spelling service when the service finishes
53 // checking text reveived by a SpellCheckHostMsg_CallSpellingService message. 54 // checking text reveived by a SpellCheckHostMsg_CallSpellingService message.
54 // If the service is not available, the 4th parameter should be false and 55 // If the service is not available, the 4th parameter should be false and
55 // the 5th parameter should contain the requested setence. 56 // the 5th parameter should contain the requested sentence.
56 IPC_MESSAGE_ROUTED5(SpellCheckMsg_RespondSpellingService, 57 IPC_MESSAGE_ROUTED5(SpellCheckMsg_RespondSpellingService,
57 int /* request identifier given by WebKit */, 58 int /* request identifier given by WebKit */,
58 int /* offset */, 59 int /* offset */,
59 bool /* succeeded calling serivce */, 60 bool /* succeeded calling serivce */,
60 string16 /* sentence */, 61 string16 /* sentence */,
61 std::vector<SpellCheckResult>) 62 std::vector<SpellCheckResult>)
62 #endif 63 #endif
63 64
64 #if defined(OS_MACOSX) 65 #if defined(OS_MACOSX)
65 // This message tells the renderer to advance to the next misspelling. It is 66 // This message tells the renderer to advance to the next misspelling. It is
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 126
126 IPC_MESSAGE_CONTROL3(SpellCheckHostMsg_RequestTextCheck, 127 IPC_MESSAGE_CONTROL3(SpellCheckHostMsg_RequestTextCheck,
127 int /* route_id for response */, 128 int /* route_id for response */,
128 int /* request identifier given by WebKit */, 129 int /* request identifier given by WebKit */,
129 string16 /* sentence */) 130 string16 /* sentence */)
130 131
131 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_ToggleSpellCheck, 132 IPC_MESSAGE_ROUTED2(SpellCheckHostMsg_ToggleSpellCheck,
132 bool /* enabled */, 133 bool /* enabled */,
133 bool /* checked */) 134 bool /* checked */)
134 #endif // OS_MACOSX 135 #endif // OS_MACOSX
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/spellchecker_submenu_observer_mac.cc ('k') | chrome/renderer/spellchecker/spellcheck.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698