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

Side by Side Diff: chrome/browser/cocoa/autocomplete_text_field_cell.h

Issue 199072: Add SSL icons on Mac OS X (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 19 matching lines...) Expand all
30 // left-hand side of the field. Exclusive WRT |hintString_|. 30 // left-hand side of the field. Exclusive WRT |hintString_|.
31 scoped_nsobject<NSAttributedString> keywordString_; 31 scoped_nsobject<NSAttributedString> keywordString_;
32 32
33 // Set if there is a string to display as a hint on the right-hand 33 // Set if there is a string to display as a hint on the right-hand
34 // side of the field. Exclusive WRT |keywordString_|; 34 // side of the field. Exclusive WRT |keywordString_|;
35 scoped_nsobject<NSAttributedString> hintString_; 35 scoped_nsobject<NSAttributedString> hintString_;
36 36
37 // YES if the info cell has been changed in a way which would result 37 // YES if the info cell has been changed in a way which would result
38 // in the cell needing to be laid out again. 38 // in the cell needing to be laid out again.
39 BOOL fieldEditorNeedsReset_; 39 BOOL fieldEditorNeedsReset_;
40
41 // Icon that represents the state of the SSL connection
42 scoped_nsobject<NSImage> hintIcon_;
40 } 43 }
41 44
42 @property BOOL fieldEditorNeedsReset; 45 @property BOOL fieldEditorNeedsReset;
43 46
44 // TODO(shess): There should be two alternatives for 47 // TODO(shess): There should be two alternatives for
45 // -setKeywordString:, the normal string and the min string. Min can 48 // -setKeywordString:, the normal string and the min string. Min can
46 // be used when the text field's contents gets too wide to fit both it 49 // be used when the text field's contents gets too wide to fit both it
47 // and this. 50 // and this.
48 51
49 // The following setup |keywordString_| or |hintString_| based on the 52 // The following setup |keywordString_| or |hintString_| based on the
50 // input, and set |fieldEditorNeedsReset_| if the layout of the field 53 // input, and set |fieldEditorNeedsReset_| if the layout of the field
51 // changed. 54 // changed.
52 - (void)setKeywordString:(NSString*)aString; 55 - (void)setKeywordString:(NSString*)aString;
53 - (void)setKeywordHintPrefix:(NSString*)prefixString 56 - (void)setKeywordHintPrefix:(NSString*)prefixString
54 image:(NSImage*)anImage 57 image:(NSImage*)anImage
55 suffix:(NSString*)suffixString; 58 suffix:(NSString*)suffixString;
56 - (void)setSearchHintString:(NSString*)aString; 59 - (void)setSearchHintString:(NSString*)aString;
57 - (void)clearKeywordAndHint; 60 - (void)clearKeywordAndHint;
58 61
62 - (void)setHintIcon:(NSImage*)icon;
63
59 // 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.
60 - (NSRect)textCursorFrameForFrame:(NSRect)cellFrame; 65 - (NSRect)textCursorFrameForFrame:(NSRect)cellFrame;
61 66
62 // Return the portion of the cell to use for text display. 67 // Return the portion of the cell to use for text display.
63 - (NSRect)textFrameForFrame:(NSRect)cellFrame; 68 - (NSRect)textFrameForFrame:(NSRect)cellFrame;
64 69
65 @end 70 @end
66 71
67 // Internal methods here exposed for unit testing. 72 // Internal methods here exposed for unit testing.
68 @interface AutocompleteTextFieldCell (UnitTesting) 73 @interface AutocompleteTextFieldCell (UnitTesting)
69 74
70 @property(readonly) NSAttributedString* keywordString; 75 @property(readonly) NSAttributedString* keywordString;
71 @property(readonly) NSAttributedString* hintString; 76 @property(readonly) NSAttributedString* hintString;
77 @property(readonly) NSImage* hintIcon;
72 78
73 @end 79 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698