diff options
author | sidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-04 18:53:16 +0000 |
---|---|---|
committer | sidchat@google.com <sidchat@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-04 18:53:16 +0000 |
commit | af9037c87804d9f9b52d800b7c37668e4f45244c (patch) | |
tree | 1b7353e44ebbc3351264ad81cea3aa6ac45d964e /chrome/browser/render_view_context_menu_controller.cc | |
parent | c0b2c0f842774e99034eb4454132c8d909bac1bb (diff) | |
download | chromium_src-af9037c87804d9f9b52d800b7c37668e4f45244c.zip chromium_src-af9037c87804d9f9b52d800b7c37668e4f45244c.tar.gz chromium_src-af9037c87804d9f9b52d800b7c37668e4f45244c.tar.bz2 |
Add support in spell check options sub-context menu to pop up fonts and languages options menu.
Review URL: http://codereview.chromium.org/12908
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6364 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/render_view_context_menu_controller.cc')
-rw-r--r-- | chrome/browser/render_view_context_menu_controller.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/render_view_context_menu_controller.cc b/chrome/browser/render_view_context_menu_controller.cc index 4943333..43836d2 100644 --- a/chrome/browser/render_view_context_menu_controller.cc +++ b/chrome/browser/render_view_context_menu_controller.cc @@ -9,6 +9,7 @@ #include "base/scoped_clipboard_writer.h" #include "base/string_util.h" #include "chrome/app/chrome_dll_resource.h" +#include "chrome/browser/views/options/fonts_languages_window_view.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" @@ -184,12 +185,12 @@ bool RenderViewContextMenuController::IsCommandEnabled(int id) const { return true; case IDS_CONTENT_CONTEXT_ADD_TO_DICTIONARY: return !params_.misspelled_word.empty(); + case IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS: + return true; case IDS_CONTENT_CONTEXT_VIEWPAGEINFO: return (source_web_contents_->controller()->GetActiveEntry() != NULL); case IDS_CONTENT_CONTEXT_VIEWFRAMEINFO: return true; - case IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS: - return true; case IDS_CONTENT_CONTEXT_SAVEFRAMEAS: case IDS_CONTENT_CONTEXT_PRINTFRAME: case IDS_CONTENT_CONTEXT_ADDSEARCHENGINE: // Not implemented. @@ -446,6 +447,14 @@ void RenderViewContextMenuController::ExecuteCommand(int id) { params_.misspelled_word); break; + case IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS: + views::Window::CreateChromeWindow( + source_web_contents_->GetContentHWND(), + gfx::Rect(), + new FontsLanguagesWindowView( + source_web_contents_->profile()))->Show(); + break; + case IDS_CONTENT_CONTEXT_ADDSEARCHENGINE: // Not implemented. default: break; |