| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #import "chrome/browser/cocoa/styled_text_field_cell.h" | 7 #import "chrome/browser/cocoa/styled_text_field_cell.h" |
| 8 | 8 |
| 9 #include "base/scoped_nsobject.h" | 9 #include "base/scoped_nsobject.h" |
| 10 #include "chrome/browser/cocoa/location_bar_view_mac.h" | 10 #include "chrome/browser/cocoa/location_bar_view_mac.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 scoped_nsobject<NSAttributedString> keywordString_; | 57 scoped_nsobject<NSAttributedString> keywordString_; |
| 58 | 58 |
| 59 // Set if there is a string to display as a hint on the right-hand | 59 // Set if there is a string to display as a hint on the right-hand |
| 60 // side of the field. Exclusive WRT |keywordString_|; | 60 // side of the field. Exclusive WRT |keywordString_|; |
| 61 scoped_nsobject<NSAttributedString> hintString_; | 61 scoped_nsobject<NSAttributedString> hintString_; |
| 62 | 62 |
| 63 // The location icon sits at the left-hand side of the field. | 63 // The location icon sits at the left-hand side of the field. |
| 64 // |keywordString_| overrides. | 64 // |keywordString_| overrides. |
| 65 LocationBarViewMac::LocationIconView* locationIconView_; | 65 LocationBarViewMac::LocationIconView* locationIconView_; |
| 66 | 66 |
| 67 // The star icon sits at the right-hand side of the field when an |
| 68 // URL is being shown. |
| 69 LocationBarViewMac::LocationBarImageView* starIconView_; |
| 70 |
| 67 // The security label floats to the left of page actions at the | 71 // The security label floats to the left of page actions at the |
| 68 // right-hand side. | 72 // right-hand side. |
| 69 LocationBarViewMac::LocationBarImageView* securityLabelView_; | 73 LocationBarViewMac::LocationBarImageView* securityLabelView_; |
| 70 | 74 |
| 71 // List of views showing visible Page Actions. Owned by the location bar. | 75 // List of views showing visible Page Actions. Owned by the location bar. |
| 72 // Display is exclusive WRT the |hintString_| and |keywordString_|. | 76 // Display is exclusive WRT the |hintString_| and |keywordString_|. |
| 73 // This may be NULL during testing. | 77 // This may be NULL during testing. |
| 74 LocationBarViewMac::PageActionViewList* page_action_views_; | 78 LocationBarViewMac::PageActionViewList* page_action_views_; |
| 75 | 79 |
| 76 // List of content blocked icons. This may be NULL during testing. | 80 // List of content blocked icons. This may be NULL during testing. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 90 suffix:(NSString*)suffixString | 94 suffix:(NSString*)suffixString |
| 91 availableWidth:(CGFloat)width; | 95 availableWidth:(CGFloat)width; |
| 92 | 96 |
| 93 // Suppresses hint entirely if |aString| won't fit w/in |width|. | 97 // Suppresses hint entirely if |aString| won't fit w/in |width|. |
| 94 // String must be non-nil. | 98 // String must be non-nil. |
| 95 - (void)setSearchHintString:(NSString*)aString | 99 - (void)setSearchHintString:(NSString*)aString |
| 96 availableWidth:(CGFloat)width; | 100 availableWidth:(CGFloat)width; |
| 97 - (void)clearKeywordAndHint; | 101 - (void)clearKeywordAndHint; |
| 98 | 102 |
| 99 - (void)setLocationIconView:(LocationBarViewMac::LocationIconView*)view; | 103 - (void)setLocationIconView:(LocationBarViewMac::LocationIconView*)view; |
| 104 - (void)setStarIconView:(LocationBarViewMac::LocationBarImageView*)view; |
| 100 - (void)setSecurityLabelView:(LocationBarViewMac::LocationBarImageView*)view; | 105 - (void)setSecurityLabelView:(LocationBarViewMac::LocationBarImageView*)view; |
| 101 - (void)setPageActionViewList:(LocationBarViewMac::PageActionViewList*)list; | 106 - (void)setPageActionViewList:(LocationBarViewMac::PageActionViewList*)list; |
| 102 - (void)setContentSettingViewsList: | 107 - (void)setContentSettingViewsList: |
| 103 (LocationBarViewMac::ContentSettingViews*)views; | 108 (LocationBarViewMac::ContentSettingViews*)views; |
| 104 | 109 |
| 105 // Returns an array of the visible AutocompleteTextFieldIcon objects. Returns | 110 // Returns an array of the visible AutocompleteTextFieldIcon objects. Returns |
| 106 // only visible icons. | 111 // only visible icons. |
| 107 - (NSArray*)layedOutIcons:(NSRect)cellFrame; | 112 - (NSArray*)layedOutIcons:(NSRect)cellFrame; |
| 108 | 113 |
| 114 // Return the rectangle the star is being shown in, for purposes of |
| 115 // positioning the bookmark bubble. |
| 116 - (NSRect)starIconFrameForFrame:(NSRect)cellFrame; |
| 117 |
| 109 // Returns the portion of the cell to use for displaying the Page | 118 // Returns the portion of the cell to use for displaying the Page |
| 110 // Action icon at the given index. May be NSZeroRect if the index's | 119 // Action icon at the given index. May be NSZeroRect if the index's |
| 111 // action is not visible. This does a linear walk over all page | 120 // action is not visible. This does a linear walk over all page |
| 112 // actions, so do not call this in a loop to get the position of all | 121 // actions, so do not call this in a loop to get the position of all |
| 113 // page actions. Use |-layedOutIcons:| instead in that case. | 122 // page actions. Use |-layedOutIcons:| instead in that case. |
| 114 - (NSRect)pageActionFrameForIndex:(size_t)index inFrame:(NSRect)cellFrame; | 123 - (NSRect)pageActionFrameForIndex:(size_t)index inFrame:(NSRect)cellFrame; |
| 115 | 124 |
| 116 // Similar to |pageActionFrameForIndex:inFrame| but accepts an | 125 // Similar to |pageActionFrameForIndex:inFrame| but accepts an |
| 117 // ExtensionAction for when the index is not known. | 126 // ExtensionAction for when the index is not known. |
| 118 - (NSRect)pageActionFrameForExtensionAction:(ExtensionAction*)action | 127 - (NSRect)pageActionFrameForExtensionAction:(ExtensionAction*)action |
| (...skipping 28 matching lines...) Expand all Loading... |
| 147 @property(readonly) NSAttributedString* hintIconLabel; | 156 @property(readonly) NSAttributedString* hintIconLabel; |
| 148 | 157 |
| 149 // Returns the total number of installed Page Actions, visible or not. | 158 // Returns the total number of installed Page Actions, visible or not. |
| 150 - (size_t)pageActionCount; | 159 - (size_t)pageActionCount; |
| 151 | 160 |
| 152 // Returns the portion of the cell to use for displaying the location | 161 // Returns the portion of the cell to use for displaying the location |
| 153 // icon. | 162 // icon. |
| 154 - (NSRect)locationIconFrameForFrame:(NSRect)cellFrame; | 163 - (NSRect)locationIconFrameForFrame:(NSRect)cellFrame; |
| 155 | 164 |
| 156 @end | 165 @end |
| OLD | NEW |