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/web_contents.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/web_contents.cc')
-rw-r--r-- | chrome/browser/web_contents.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/web_contents.cc b/chrome/browser/web_contents.cc index 3a9fd3a..a796dc6 100644 --- a/chrome/browser/web_contents.cc +++ b/chrome/browser/web_contents.cc @@ -954,6 +954,10 @@ void WebContents::Replace(const std::wstring& text) { render_view_host()->Replace(text); } +void WebContents::AddToDictionary(const std::wstring& word) { + render_view_host()->AddToDictionary(word); +} + void WebContents::Delete() { render_view_host()->Delete(); } @@ -1698,8 +1702,12 @@ void WebContents::DidDownloadImage( void WebContents::ShowContextMenu( const ViewHostMsg_ContextMenu_Params& params) { RenderViewContextMenuController menu_controller(this, params); - RenderViewContextMenu menu(&menu_controller, GetHWND(), params.type, - params.dictionary_suggestions, profile()); + RenderViewContextMenu menu(&menu_controller, + GetHWND(), + params.type, + params.misspelled_word, + params.dictionary_suggestions, + profile()); POINT screen_pt = { params.x, params.y }; MapWindowPoints(GetHWND(), HWND_DESKTOP, &screen_pt, 1); |