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

Unified Diff: chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h

Issue 2971004: [Mac] Star as a rhs-decoration in AutocompleteTextFieldCell. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Changes for rohit, unit-test tweaks. Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h
diff --git a/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h b/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h
index 8e855303aa3d439d238f68859715c6bfaddeff9a..deaf8295af061ce0db8e46357c88a24ce75b2858 100644
--- a/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h
+++ b/chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h
@@ -53,18 +53,15 @@ class LocationBarDecoration;
// a button-like token on the left-hand side).
@interface AutocompleteTextFieldCell : StyledTextFieldCell {
@private
- // Decorations which live to the left of the text. Owned by
- // |LocationBarViewMac|.
+ // Decorations which live to the left and right of the text, ordered
+ // from outside in. Decorations are owned by |LocationBarViewMac|.
std::vector<LocationBarDecoration*> leftDecorations_;
+ std::vector<LocationBarDecoration*> rightDecorations_;
// Set if there is a string to display as a hint on the right-hand
// side of the field. Exclusive WRT |keywordString_|;
scoped_nsobject<NSAttributedString> hintString_;
- // The star icon sits at the right-hand side of the field when an
- // URL is being shown.
- LocationBarViewMac::LocationBarImageView* starIconView_;
-
// List of views showing visible Page Actions. Owned by the location bar.
// Display is exclusive WRT the |hintString_| and |keywordString_|.
// This may be NULL during testing.
@@ -87,17 +84,20 @@ class LocationBarDecoration;
availableWidth:(CGFloat)width;
- (void)clearHint;
-// Clear |leftDecorations_|.
+// Clear |leftDecorations_| and |rightDecorations_|.
- (void)clearDecorations;
// Add a new left-side decoration to the right of the existing
// left-side decorations.
- (void)addLeftDecoration:(LocationBarDecoration*)decoration;
+// Add a new right-side decoration to the left of the existing
+// right-side decorations.
+- (void)addRightDecoration:(LocationBarDecoration*)decoration;
+
// The width available after accounting for decorations.
- (CGFloat)availableWidthInFrame:(const NSRect)frame;
-- (void)setStarIconView:(LocationBarViewMac::LocationBarImageView*)view;
- (void)setPageActionViewList:(LocationBarViewMac::PageActionViewList*)list;
- (void)setContentSettingViewsList:
(LocationBarViewMac::ContentSettingViews*)views;
@@ -106,10 +106,6 @@ class LocationBarDecoration;
// only visible icons.
- (NSArray*)layedOutIcons:(NSRect)cellFrame;
-// Return the rectangle the star is being shown in, for purposes of
-// positioning the bookmark bubble.
-- (NSRect)starIconFrameForFrame:(NSRect)cellFrame;
-
// Return the frame for |aDecoration| if the cell is in |cellFrame|.
// Returns |NSZeroRect| for decorations which are not currently
// visible.
« no previous file with comments | « no previous file | chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698