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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h

Issue 2861283002: [Mac] Refactor decoration divider code. (Closed)
Patch Set: Created 3 years, 7 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
Index: chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h
index beaae57e1c326106c35f91478cc3519c149b830e..56a202dfaec47eda57bdbe68411be961202e3858 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h
@@ -170,6 +170,9 @@ class LocationBarDecoration {
static const SkColor kMaterialDarkModeTextColor;
protected:
+ // Returns the amount of padding between the divider and the label text.
+ virtual CGFloat DividerPadding() const;
+
// Gets the color used to draw the Material Design icon. The default
// implementation satisfies most cases - few subclasses should need to
// override.
@@ -180,8 +183,11 @@ class LocationBarDecoration {
// decorations are assigned their icon (vs. creating it themselves).
virtual const gfx::VectorIcon* GetMaterialVectorIcon() const;
- // Gets the color used for the divider. Only used in Material design.
- NSColor* GetDividerColor(bool location_bar_is_dark) const;
+ // Draws the decoration's vertical divider. Assumes already lock focused on
+ // the control_view.
+ void DrawDivider(NSView* control_view,
+ NSRect decoration_frame,
+ CGFloat alpha) const;
private:
// Called when the state of the decoration is updated.

Powered by Google App Engine
This is Rietveld 408576698