| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/scoped_nsobject.h" | 7 #include "base/scoped_nsobject.h" |
| 8 | 8 |
| 9 // AutocompleteTextFieldCell customizes the look of the Omnibox text | 9 // AutocompleteTextFieldCell customizes the look of the Omnibox text |
| 10 // field. The border and focus ring are modified, as is the font | 10 // field. The border and focus ring are modified, as is the font |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 - (void)setHintIcon:(NSImage*)icon; | 62 - (void)setHintIcon:(NSImage*)icon; |
| 63 | 63 |
| 64 // Return the portion of the cell to show the text cursor over. | 64 // Return the portion of the cell to show the text cursor over. |
| 65 - (NSRect)textCursorFrameForFrame:(NSRect)cellFrame; | 65 - (NSRect)textCursorFrameForFrame:(NSRect)cellFrame; |
| 66 | 66 |
| 67 // Return the portion of the cell to use for text display. This | 67 // Return the portion of the cell to use for text display. This |
| 68 // corresponds to the frame with our added decorations sliced off. | 68 // corresponds to the frame with our added decorations sliced off. |
| 69 - (NSRect)textFrameForFrame:(NSRect)cellFrame; | 69 - (NSRect)textFrameForFrame:(NSRect)cellFrame; |
| 70 | 70 |
| 71 // Return the portion of the cell to use for displaing the |hintIcon_|. |
| 72 - (NSRect)hintImageFrameForFrame:(NSRect)cellFrame; |
| 73 |
| 71 @end | 74 @end |
| 72 | 75 |
| 73 // Internal methods here exposed for unit testing. | 76 // Internal methods here exposed for unit testing. |
| 74 @interface AutocompleteTextFieldCell (UnitTesting) | 77 @interface AutocompleteTextFieldCell (UnitTesting) |
| 75 | 78 |
| 76 @property(readonly) NSAttributedString* keywordString; | 79 @property(readonly) NSAttributedString* keywordString; |
| 77 @property(readonly) NSAttributedString* hintString; | 80 @property(readonly) NSAttributedString* hintString; |
| 78 @property(readonly) NSImage* hintIcon; | 81 @property(readonly) NSImage* hintIcon; |
| 79 | 82 |
| 80 @end | 83 @end |
| OLD | NEW |