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

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

Issue 149717: [Mac] Refactor location-bar autocomplete cell classes. (Closed)
Patch Set: jrg comment Created 11 years, 5 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/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
new file mode 100644
index 0000000000000000000000000000000000000000..4c29bb3bb75f4c63bd05c77842013870e54a3b1c
--- /dev/null
+++ b/chrome/browser/cocoa/autocomplete_text_field_editor.mm
@@ -0,0 +1,33 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "chrome/browser/cocoa/autocomplete_text_field_editor.h"
+
+#include "base/string_util.h"
+#include "base/sys_string_conversions.h"
+
+@implementation AutocompleteTextFieldEditor
+
+- (void)copy:(id)sender {
+ NSPasteboard* pb = [NSPasteboard generalPasteboard];
+ [self performCopy:pb];
+}
+
+- (void)cut:(id)sender {
+ NSPasteboard* pb = [NSPasteboard generalPasteboard];
+ [self performCut:pb];
+}
+
+- (void)performCopy:(NSPasteboard*)pb {
+ [pb declareTypes:[NSArray array] owner:nil];
+ [self writeSelectionToPasteboard:pb types:
+ [NSArray arrayWithObject:NSStringPboardType]];
+}
+
+- (void)performCut:(NSPasteboard*)pb {
+ [self performCopy:pb];
+ [self delete:nil];
+}
+
+@end
« no previous file with comments | « chrome/browser/cocoa/autocomplete_text_field_editor.h ('k') | chrome/browser/cocoa/autocomplete_text_field_editor_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698