| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 base::scoped_nsobject<URLDropTargetHandler> dropHandler_; | 134 base::scoped_nsobject<URLDropTargetHandler> dropHandler_; |
| 135 | 135 |
| 136 // Holds current tooltip strings, to keep them from being dealloced. | 136 // Holds current tooltip strings, to keep them from being dealloced. |
| 137 base::scoped_nsobject<NSMutableArray> currentToolTips_; | 137 base::scoped_nsobject<NSMutableArray> currentToolTips_; |
| 138 | 138 |
| 139 // Animation object used for resizing the autocomplete field. | 139 // Animation object used for resizing the autocomplete field. |
| 140 base::scoped_nsobject<NSViewAnimation> resizeAnimation_; | 140 base::scoped_nsobject<NSViewAnimation> resizeAnimation_; |
| 141 | 141 |
| 142 base::scoped_nsobject<NSString> suggestText_; | 142 base::scoped_nsobject<NSString> suggestText_; |
| 143 base::scoped_nsobject<NSColor> suggestColor_; | 143 base::scoped_nsobject<NSColor> suggestColor_; |
| 144 |
| 145 base::scoped_nsobject<NSView> shadowView_; |
| 144 } | 146 } |
| 145 | 147 |
| 146 @property(nonatomic) AutocompleteTextFieldObserver* observer; | 148 @property(nonatomic) AutocompleteTextFieldObserver* observer; |
| 147 | 149 |
| 150 // Returns the color of the shadow that's drawn under the AutocompleteTextField |
| 151 // in Incognito mode in Material Design. |
| 152 + (NSColor*)shadowColor; |
| 153 |
| 148 // Convenience method to return the cell, casted appropriately. | 154 // Convenience method to return the cell, casted appropriately. |
| 149 - (AutocompleteTextFieldCell*)cell; | 155 - (AutocompleteTextFieldCell*)cell; |
| 150 | 156 |
| 151 // Superclass aborts editing before changing the string, which causes | 157 // Superclass aborts editing before changing the string, which causes |
| 152 // problems for undo. This version modifies the field editor's | 158 // problems for undo. This version modifies the field editor's |
| 153 // contents if the control is already being edited. | 159 // contents if the control is already being edited. |
| 154 - (void)setAttributedStringValue:(NSAttributedString*)aString; | 160 - (void)setAttributedStringValue:(NSAttributedString*)aString; |
| 155 | 161 |
| 156 // Clears the undo chain for this text field. | 162 // Clears the undo chain for this text field. |
| 157 - (void)clearUndoChain; | 163 - (void)clearUndoChain; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // Draw gray text suggestion in |controlView|. | 200 // Draw gray text suggestion in |controlView|. |
| 195 void DrawGrayTextAutocompletion(NSAttributedString* mainText, | 201 void DrawGrayTextAutocompletion(NSAttributedString* mainText, |
| 196 NSString* suggestText, | 202 NSString* suggestText, |
| 197 NSColor* suggestColor, | 203 NSColor* suggestColor, |
| 198 NSView* controlView, | 204 NSView* controlView, |
| 199 NSRect frame); | 205 NSRect frame); |
| 200 | 206 |
| 201 } // namespace autocomplete_text_field | 207 } // namespace autocomplete_text_field |
| 202 | 208 |
| 203 #endif // CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ | 209 #endif // CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ |
| OLD | NEW |