Skip to content

Commit

Permalink
Add a separator between app's context menu commands and developer mod…
Browse files Browse the repository at this point in the history
…e commands.

BUG=154642


Review URL: https://chromiumcodereview.appspot.com/11087012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160991 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
mek@chromium.org committed Oct 10, 2012
1 parent af26d99 commit 889d59d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion chrome/browser/tab_contents/render_view_context_menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ void RenderViewContextMenu::AppendPlatformAppItems() {

bool has_selection = !params_.selection_text.empty();

// Add undo/redo, cut/copy/paste etc for text fields
// Add undo/redo, cut/copy/paste etc for text fields.
if (params_.is_editable)
AppendEditableItems();
else if (has_selection)
Expand All @@ -520,6 +520,12 @@ void RenderViewContextMenu::AppendPlatformAppItems() {
if (platform_app->location() == Extension::LOAD ||
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDebugPackedApps)) {
// Add a separator if there are any items already in the menu.
if (menu_model_.GetItemCount() &&
menu_model_.GetTypeAt(menu_model_.GetItemCount() - 1) !=
ui::MenuModel::TYPE_SEPARATOR)
menu_model_.AddSeparator(ui::NORMAL_SEPARATOR);

menu_model_.AddItemWithStringId(IDC_RELOAD,
IDS_CONTENT_CONTEXT_RELOAD_PAGE);
menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP,
Expand Down

0 comments on commit 889d59d

Please sign in to comment.