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

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

Issue 246009: [Mac] Support undo in the omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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.mm
===================================================================
--- chrome/browser/cocoa/autocomplete_text_field.mm (revision 31782)
+++ chrome/browser/cocoa/autocomplete_text_field.mm (working copy)
@@ -160,4 +160,14 @@
}
}
+- (NSUndoManager*)undoManagerForTextView:(NSTextView*)textView {
+ if (!undoManager_.get())
+ undoManager_.reset([[NSUndoManager alloc] init]);
+ return undoManager_.get();
+}
+
+- (void)clearUndoChain {
+ [undoManager_ removeAllActions];
+}
+
@end
« no previous file with comments | « chrome/browser/cocoa/autocomplete_text_field.h ('k') | chrome/browser/cocoa/autocomplete_text_field_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698