diff options
Diffstat (limited to 'chrome/browser/render_view_context_menu_controller.cc')
-rw-r--r-- | chrome/browser/render_view_context_menu_controller.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/render_view_context_menu_controller.cc b/chrome/browser/render_view_context_menu_controller.cc index 8ea251e..39f5b9e 100644 --- a/chrome/browser/render_view_context_menu_controller.cc +++ b/chrome/browser/render_view_context_menu_controller.cc @@ -169,7 +169,8 @@ bool RenderViewContextMenuController::IsCommandEnabled(int id) const { case IDC_USESPELLCHECKSUGGESTION_3: case IDC_USESPELLCHECKSUGGESTION_4: return true; - + case IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY: + return !params_.misspelled_word.empty(); case IDS_CONTENT_CONTEXT_VIEWPAGEINFO: case IDS_CONTENT_CONTEXT_VIEWFRAMEINFO: case IDS_CONTENT_CONTEXT_SAVEFRAMEAS: @@ -368,6 +369,10 @@ void RenderViewContextMenuController::ExecuteCommand(int id) { id - IDC_USESPELLCHECKSUGGESTION_0]); break; + case IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY: + source_web_contents_->AddToDictionary(params_.misspelled_word); + break; + case IDS_CONTENT_CONTEXT_ADDSEARCHENGINE: // Not implemented. default: break; |