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

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

Issue 10828392: Context menus for text fields in platform apps should show available actions (copy, paste, etc). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
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 d668e7a00ca381af2517afa27c3be96d7d578a02..1d1218dd53e6477775010da8a88cc2ff727ffa36 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -655,6 +655,13 @@ void RenderViewContextMenu::AppendPlatformAppItems() {
int index = 0;
AppendExtensionItems(platform_app->id(), &index);
+ // Add undo/redo, cut/copy/paste etc for text fields
+ if (params_.is_editable) {
+ if (menu_model_.GetItemCount() > 0)
+ menu_model_.AddSeparator();
+ AppendEditableItems();
+ }
asargent_no_longer_on_chrome 2012/08/20 19:40:21 I think we also want to add the copy menu command
Marijn Kruisselbrink 2012/08/20 19:46:58 I thought about that, but as far as I could tell i
+
// Add dev tools for unpacked extensions.
if (platform_app->location() == Extension::LOAD) {
menu_model_.AddItemWithStringId(IDC_RELOAD, IDS_CONTENT_CONTEXT_RELOAD);
« no previous file with comments | « chrome/browser/extensions/platform_app_browsertest.cc ('k') | chrome/test/data/extensions/platform_apps/context_menu/test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698