From a48b6295fdea8636bb77805c478f2408e68fd350 Mon Sep 17 00:00:00 2001 From: "rouslan@chromium.org" Date: Thu, 23 May 2013 00:47:57 +0000 Subject: [PATCH] Pass the misspelling hash identifier to the spelling menu observer This CL passes the hash identifier of the misspelling under the cursor to the spelling menu observer. The spelling menu observer will use this identifier to collect feedback about user actions on misspellings. For example, the user could ignore spelling suggestions, add a word to their custom dictionary, or select one of the spellcheck suggestions. This feedback will be used to improve spellcheck suggestions. BUG=170514 Review URL: https://chromiumcodereview.appspot.com/15616002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201654 0039d316-1c4b-4281-b951-d872f2087c98 --- content/common/view_messages.h | 1 + content/public/common/context_menu_params.h | 3 +++ content/renderer/context_menu_params_builder.cc | 1 + 3 files changed, 5 insertions(+) diff --git a/content/common/view_messages.h b/content/common/view_messages.h index b036cf53feb2..9eb19048875b 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -166,6 +166,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::ContextMenuParams) IPC_STRUCT_TRAITS_MEMBER(media_flags) IPC_STRUCT_TRAITS_MEMBER(selection_text) IPC_STRUCT_TRAITS_MEMBER(misspelled_word) + IPC_STRUCT_TRAITS_MEMBER(misspelling_hash) IPC_STRUCT_TRAITS_MEMBER(dictionary_suggestions) IPC_STRUCT_TRAITS_MEMBER(speech_input_enabled) IPC_STRUCT_TRAITS_MEMBER(spellcheck_enabled) diff --git a/content/public/common/context_menu_params.h b/content/public/common/context_menu_params.h index e6b46d59b2f1..1d5d9c6b6359 100644 --- a/content/public/common/context_menu_params.h +++ b/content/public/common/context_menu_params.h @@ -102,6 +102,9 @@ struct CONTENT_EXPORT ContextMenuParams { // |dictionary_suggestions| list. string16 misspelled_word; + // The identifier of the misspelling under the cursor, if any. + uint32 misspelling_hash; + // Suggested replacements for a misspelled word under the cursor. // This vector gets populated in the render process host // by intercepting ViewHostMsg_ContextMenu in ResourceMessageFilter diff --git a/content/renderer/context_menu_params_builder.cc b/content/renderer/context_menu_params_builder.cc index dfc6582058bc..8087a3375827 100644 --- a/content/renderer/context_menu_params_builder.cc +++ b/content/renderer/context_menu_params_builder.cc @@ -30,6 +30,7 @@ ContextMenuParams ContextMenuParamsBuilder::Build( params.media_flags = data.mediaFlags; params.selection_text = data.selectedText; params.misspelled_word = data.misspelledWord; + params.misspelling_hash = data.misspellingHash; params.speech_input_enabled = data.isSpeechInputEnabled; params.spellcheck_enabled = data.isSpellCheckingEnabled; params.is_editable = data.isEditable; -- 2.11.4.GIT