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

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

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.h
===================================================================
--- chrome/browser/cocoa/autocomplete_text_field.h (revision 31782)
+++ chrome/browser/cocoa/autocomplete_text_field.h (working copy)
@@ -8,6 +8,8 @@
#import <Cocoa/Cocoa.h>
#import "chrome/browser/cocoa/styled_text_field.h"
+#include "base/scoped_nsobject.h"
+
@class AutocompleteTextFieldCell;
// AutocompleteTextField intercepts UI actions for forwarding to
@@ -55,6 +57,10 @@
@interface AutocompleteTextField : StyledTextField {
@private
+ // Undo manager for this text field. We use a specific instance rather than
+ // the standard undo manager in order to let us clear the undo stack at will.
+ scoped_nsobject<NSUndoManager> undoManager_;
+
AutocompleteTextFieldObserver* observer_; // weak, owned by location bar.
}
@@ -68,6 +74,9 @@
// contents if the control is already being edited.
- (void)setAttributedStringValue:(NSAttributedString*)aString;
+// Clears the undo chain for this text field.
+- (void)clearUndoChain;
+
@end
#endif // CHROME_BROWSER_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_mac.mm ('k') | chrome/browser/cocoa/autocomplete_text_field.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698