diff options
author | rouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-02 02:04:20 +0000 |
---|---|---|
committer | rouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-02 02:04:20 +0000 |
commit | 633210c8a8e9c6cd698a854f760651bd568c9a40 (patch) | |
tree | e1c1cd028e093797c289944d6f3ae27c12212b69 /chrome/common | |
parent | 15a6a6a4fbfa3542bd936ab55cc0cf2719e35c48 (diff) | |
download | chromium_src-633210c8a8e9c6cd698a854f760651bd568c9a40.zip chromium_src-633210c8a8e9c6cd698a854f760651bd568c9a40.tar.gz chromium_src-633210c8a8e9c6cd698a854f760651bd568c9a40.tar.bz2 |
Periodically request a list of spellcheck markers in all renderers for feedback
This CL adds a class SpellingServiceFeedback that will be used for sending
feedback to the spelling service. There's one instance of this class per
profile. SpellcheckService owns the SpellingServiceFeedback instance.
SpellingServiceFeedback periodically requests a list of all document markers in
the renderers. It will use the list to determine the kinds of feedback to send
to the spelling service.
BUG=170514
Review URL: https://chromiumcodereview.appspot.com/14126015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197779 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/spellcheck_common.h | 3 | ||||
-rw-r--r-- | chrome/common/spellcheck_messages.h | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/chrome/common/spellcheck_common.h b/chrome/common/spellcheck_common.h index c2d8498..607ef64 100644 --- a/chrome/common/spellcheck_common.h +++ b/chrome/common/spellcheck_common.h @@ -15,6 +15,9 @@ class FilePath; namespace chrome { namespace spellcheck_common { +// The number of seconds between sending feedback to spelling service. +static const int kFeedbackIntervalSeconds = 1800; // 30 minutes + // Max number of dictionary suggestions. static const int kMaxSuggestions = 5; diff --git a/chrome/common/spellcheck_messages.h b/chrome/common/spellcheck_messages.h index c201311..b001559 100644 --- a/chrome/common/spellcheck_messages.h +++ b/chrome/common/spellcheck_messages.h @@ -24,7 +24,7 @@ IPC_STRUCT_TRAITS_END() // Messages sent from the browser to the renderer. IPC_MESSAGE_CONTROL1(SpellCheckMsg_EnableSpellCheck, - bool) + bool) // Passes some initialization params to the renderer's spellchecker. This can // be called directly after startup or in (async) response to a @@ -45,6 +45,15 @@ IPC_MESSAGE_CONTROL2(SpellCheckMsg_CustomDictionaryChanged, IPC_MESSAGE_CONTROL1(SpellCheckMsg_EnableAutoSpellCorrect, bool /* enable */) +// Request a list of all document markers in the renderer for spelling service +// feedback. +IPC_MESSAGE_CONTROL0(SpellCheckMsg_RequestDocumentMarkers) + +// Send a list of document markers in the renderer to the spelling service +// feedback sender. +IPC_MESSAGE_CONTROL1(SpellCheckHostMsg_RespondDocumentMarkers, + std::vector<uint32> /* document marker identifiers */) + #if !defined(OS_MACOSX) // Sends text-check results from the Spelling service when the service finishes // checking text received by a SpellCheckHostMsg_CallSpellingService message. |