Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2454)

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 160565: Adds support for the os x spelling panel to chromium. Users can... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/spellchecker_win.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_context_menu.cc
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu.cc (revision 25643)
+++ chrome/browser/tab_contents/render_view_context_menu.cc (working copy)
@@ -19,6 +19,7 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/spellchecker.h"
+#include "chrome/browser/spellchecker_platform_engine.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_switches.h"
@@ -258,6 +259,15 @@
l10n_util::GetStringUTF16(
IDS_CONTENT_CONTEXT_CHECK_SPELLING_OF_THIS_FIELD));
+ // Add option for showing the spelling panel if the platfrom spellchecker
+ // supports it.
+ if (SpellCheckerPlatform::SpellCheckerAvailable() &&
+ SpellCheckerPlatform::SpellCheckerProvidesPanel()) {
+ AppendCheckboxMenuItem(IDC_SPELLPANEL_TOGGLE, l10n_util::GetStringUTF16(
+ SpellCheckerPlatform::SpellingPanelVisible() ?
+ IDS_CONTENT_CONTEXT_HIDE_SPELLING_PANEL :
+ IDS_CONTENT_CONTEXT_SHOW_SPELLING_PANEL));
+ }
FinishSubMenu();
AppendSeparator();
@@ -700,6 +710,10 @@
LANGUAGES_PAGE, profile_);
break;
+ case IDC_SPELLPANEL_TOGGLE:
+ source_tab_contents_->render_view_host()->ToggleSpellPanel(
+ SpellCheckerPlatform::SpellingPanelVisible());
+ break;
case IDS_CONTENT_CONTEXT_ADDSEARCHENGINE: // Not implemented.
default:
break;
« no previous file with comments | « chrome/browser/spellchecker_win.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698