summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 02:05:16 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-12 02:05:16 +0000
commite8d5545b55d44c8b9f05d550dab052fcfe392f2d (patch)
treee8315dc3ca9623245309e408856446041e6d296a
parenta9c356bcd521d04c29233c732b7c779c08e579dd (diff)
downloadchromium_src-e8d5545b55d44c8b9f05d550dab052fcfe392f2d.zip
chromium_src-e8d5545b55d44c8b9f05d550dab052fcfe392f2d.tar.gz
chromium_src-e8d5545b55d44c8b9f05d550dab052fcfe392f2d.tar.bz2
Avoid DCHECK in RenderViewContextMenu following r46987
BUG=none TEST=none TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46999 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 8551265..388e62b 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -585,7 +585,8 @@ void RenderViewContextMenu::AppendSpellcheckOptionsSubMenu() {
}
menu_model_.AddSubMenu(
- -1, l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_SPELLCHECK_MENU),
+ IDC_SPELLCHECK_MENU,
+ l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_SPELLCHECK_MENU),
&spellcheck_submenu_model_);
}
@@ -599,7 +600,7 @@ void RenderViewContextMenu::AppendBidiSubMenu() {
l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_WRITING_DIRECTION_RTL));
menu_model_.AddSubMenu(
- -1,
+ IDC_CONTENT_CONTEXT_WRITING_DIRECTION_MENU,
l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_WRITING_DIRECTION_MENU),
&bidi_submenu_model_);
}
@@ -838,6 +839,8 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
case IDC_WRITING_DIRECTION_LTR:
return params_.writing_direction_left_to_right &
WebContextMenuData::CheckableMenuItemEnabled;
+ case IDC_CONTENT_CONTEXT_WRITING_DIRECTION_MENU:
+ return true;
#endif // OS_MACOSX
#if defined(OS_LINUX)
@@ -851,6 +854,9 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
case IDS_CONTENT_CONTEXT_ADDSEARCHENGINE: // Not implemented.
return false;
+ case IDC_SPELLCHECK_MENU:
+ return true;
+
default:
NOTREACHED();
return false;