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

Unified Diff: chrome/browser/cocoa/autocomplete_text_field_editor.mm

Issue 220040: [Mac] Enable "Edit Search Engines" in Omnibox context menu. (Closed)
Patch Set: nop to make sure I'm logging in. Created 11 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 | chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/autocomplete_text_field_editor.mm
diff --git a/chrome/browser/cocoa/autocomplete_text_field_editor.mm b/chrome/browser/cocoa/autocomplete_text_field_editor.mm
index 8bb2e8a0b95a15ba681b55a7621f0b1422d91a54..35c707ec96adbbe0c5707b410ca24ae0b84b2f0d 100644
--- a/chrome/browser/cocoa/autocomplete_text_field_editor.mm
+++ b/chrome/browser/cocoa/autocomplete_text_field_editor.mm
@@ -8,6 +8,7 @@
#include "base/string_util.h"
#include "grit/generated_resources.h"
#include "base/sys_string_conversions.h"
+#include "chrome/app/chrome_dll_resource.h" // IDC_*
#import "chrome/browser/cocoa/autocomplete_text_field.h"
@implementation AutocompleteTextFieldEditor
@@ -100,11 +101,21 @@
// TODO(rohitrao): If the clipboard is empty, should we show a
// greyed-out "Paste and Go" or nothing at all?
- if (label) {
+ if ([label length]) {
[menu addItemWithTitle:label
action:@selector(pasteAndGo:)
keyEquivalent:@""];
}
+
+ label = l10n_util::GetNSStringWithFixup(IDS_EDIT_SEARCH_ENGINES);
+ DCHECK([label length]);
+ if ([label length]) {
+ [menu addItem:[NSMenuItem separatorItem]];
+ NSMenuItem* item = [menu addItemWithTitle:label
+ action:@selector(commandDispatch:)
+ keyEquivalent:@""];
+ [item setTag:IDC_EDIT_SEARCH_ENGINES];
+ }
}
}
« no previous file with comments | « no previous file | chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698