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

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

Issue 159250: [Mac] Omnibox keyword, keyword hint, and search hint support. (Closed)
Patch Set: Get rid of funky cells and other comment responses. Created 11 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/cocoa/autocomplete_text_field.h
diff --git a/chrome/browser/cocoa/autocomplete_text_field.h b/chrome/browser/cocoa/autocomplete_text_field.h
index b592310c8399709a0d478bff13ea2b9772e1b222..2d9e76295d7b9328af84d2682fa194d5b219dd53 100644
--- a/chrome/browser/cocoa/autocomplete_text_field.h
+++ b/chrome/browser/cocoa/autocomplete_text_field.h
@@ -7,10 +7,25 @@
#import <Cocoa/Cocoa.h>
-// TODO(shess): This class will add decorations to support keyword
-// search and hints. Adding as a stub so that I can clean up naming
-// around this code all at once before layering other changes over in
-// parallel.
+@class AutocompleteTextFieldCell;
+
+// AutocompleteTextField intercepts UI actions for forwarding to
+// AutocompleteEditViewMac (*), and provides a custom look. It works
+// together with AutocompleteTextFieldEditor (mostly for intercepting
+// user actions) and AutocompleteTextFieldCell (mostly for custom
+// drawing).
+//
+// For historical reasons, chrome/browser/autocomplete is the core
+// implementation of the Omnibox. Chrome code seems to vary between
+// autocomplete and Omnibox in describing this.
+//
+// (*) AutocompleteEditViewMac is a view in the MVC sense for the
+// Chrome internals, though it's really more of a mish-mash of model,
+// view, and controller.
+
+// AutocompleteTextFieldDelegateMethods are meant to be similar to
+// NSControl delegate methods, adding additional intercepts relevant
+// to the Omnibox implementation.
@protocol AutocompleteTextFieldDelegateMethods
@@ -28,6 +43,14 @@
- (BOOL)textShouldPaste:(NSText*)fieldEditor;
+// Convenience method to return the cell, casted appropriately.
+- (AutocompleteTextFieldCell*)autocompleteTextFieldCell;
+
+// If the keyword, keyword hint, or search hint changed, then the
+// field needs to be relaidout. This accomplishes that in a manner
+// which doesn't disrupt the field delegate.
+- (void)resetFieldEditorFrameIfNeeded;
+
@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