| 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_; | |
| 146 } | 144 } |
| 147 | 145 |
| 148 @property(nonatomic) AutocompleteTextFieldObserver* observer; | 146 @property(nonatomic) AutocompleteTextFieldObserver* observer; |
| 149 | 147 |
| 150 // Returns the color of the shadow that's drawn under the AutocompleteTextField | |
| 151 // in Incognito mode in Material Design. | |
| 152 + (NSColor*)shadowColor; | |
| 153 | |
| 154 // Convenience method to return the cell, casted appropriately. | 148 // Convenience method to return the cell, casted appropriately. |
| 155 - (AutocompleteTextFieldCell*)cell; | 149 - (AutocompleteTextFieldCell*)cell; |
| 156 | 150 |
| 157 // Superclass aborts editing before changing the string, which causes | 151 // Superclass aborts editing before changing the string, which causes |
| 158 // problems for undo. This version modifies the field editor's | 152 // problems for undo. This version modifies the field editor's |
| 159 // contents if the control is already being edited. | 153 // contents if the control is already being edited. |
| 160 - (void)setAttributedStringValue:(NSAttributedString*)aString; | 154 - (void)setAttributedStringValue:(NSAttributedString*)aString; |
| 161 | 155 |
| 162 // Clears the undo chain for this text field. | 156 // Clears the undo chain for this text field. |
| 163 - (void)clearUndoChain; | 157 - (void)clearUndoChain; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 // Draw gray text suggestion in |controlView|. | 194 // Draw gray text suggestion in |controlView|. |
| 201 void DrawGrayTextAutocompletion(NSAttributedString* mainText, | 195 void DrawGrayTextAutocompletion(NSAttributedString* mainText, |
| 202 NSString* suggestText, | 196 NSString* suggestText, |
| 203 NSColor* suggestColor, | 197 NSColor* suggestColor, |
| 204 NSView* controlView, | 198 NSView* controlView, |
| 205 NSRect frame); | 199 NSRect frame); |
| 206 | 200 |
| 207 } // namespace autocomplete_text_field | 201 } // namespace autocomplete_text_field |
| 208 | 202 |
| 209 #endif // CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ | 203 #endif // CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ |
| OLD | NEW |