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

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

Issue 8318005: Show both custom and default menu items when selection is present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | « no previous file | no next file » | 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
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index e21ff5c7b12ac06889e1f5eac0ae91817a0aebb8..412e8a248fe7275fa38c04caabc6a4c27fcc6baf 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -509,10 +509,14 @@ void RenderViewContextMenu::InitMenu() {
bool has_selection = !params_.selection_text.empty();
if (AppendCustomItems()) {
- // Don't add items for Pepper menu.
- if (!params_.custom_context.is_pepper_menu)
- AppendDeveloperItems();
- return;
+ if (has_selection) {
+ menu_model_.AddSeparator();
brettw 2011/10/21 20:24:27 I get it. Can we have a comment here like: // If
+ } else {
+ // Don't add items for Pepper menu.
+ if (!params_.custom_context.is_pepper_menu)
+ AppendDeveloperItems();
+ return;
+ }
}
// When no special node or text is selected and selection has no link,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698