diff options
author | sidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 20:02:04 +0000 |
---|---|---|
committer | sidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-17 20:02:04 +0000 |
commit | 63271da3b3740aadd3bd5d186bf7bd2b33ee6347 (patch) | |
tree | 43ab35878220b56a78a8dda05b775df87ddacc4e /chrome/browser/render_view_context_menu.cc | |
parent | 64b421f984b2dfe04546729f8b35648cac3d0f20 (diff) | |
download | chromium_src-63271da3b3740aadd3bd5d186bf7bd2b33ee6347.zip chromium_src-63271da3b3740aadd3bd5d186bf7bd2b33ee6347.tar.gz chromium_src-63271da3b3740aadd3bd5d186bf7bd2b33ee6347.tar.bz2 |
Add support for "Add to dictionary" in the context menu.
Review URL: http://codereview.chromium.org/2446
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2322 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/render_view_context_menu.cc')
-rw-r--r-- | chrome/browser/render_view_context_menu.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/render_view_context_menu.cc b/chrome/browser/render_view_context_menu.cc index e8205af..96a584c 100644 --- a/chrome/browser/render_view_context_menu.cc +++ b/chrome/browser/render_view_context_menu.cc @@ -16,9 +16,11 @@ RenderViewContextMenu::RenderViewContextMenu( Menu::Delegate* delegate, HWND owner, ContextNode::Type type, + const std::wstring& misspelled_word, const std::vector<std::wstring>& misspelled_word_suggestions, Profile* profile) : Menu(delegate, Menu::TOPLEFT, owner), + misspelled_word_(misspelled_word), misspelled_word_suggestions_(misspelled_word_suggestions), profile_(profile) { InitMenu(type); @@ -120,6 +122,12 @@ void RenderViewContextMenu::AppendEditableItems() { } if (misspelled_word_suggestions_.size() > 0) AppendSeparator(); + + // If word is misspelled, give option for "Add to dictionary" + if (!misspelled_word_.empty()) { + AppendDelegateMenuItem(IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY); + AppendSeparator(); + } AppendDelegateMenuItem(IDS_CONTENT_CONTEXT_UNDO); AppendDelegateMenuItem(IDS_CONTENT_CONTEXT_REDO); |