| Index: chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
|
| diff --git a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
|
| index 714e4b291917a7a7243fea6be34e115729fa0506..8f8db5aecf9dbb2a695a52b186a4265861376621 100644
|
| --- a/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
|
| +++ b/chrome/browser/ui/cocoa/location_bar/bubble_decoration.mm
|
| @@ -31,6 +31,12 @@ const CGFloat kIconLabelPadding = 4.0;
|
| // Inset for the image frame.
|
| const CGFloat kImageFrameYInset = 4.0;
|
|
|
| +// Inset for the background frame.
|
| +const CGFloat kBackgroundFrameYInset = 2.0;
|
| +
|
| +// Left margin for the background frame.
|
| +const CGFloat kBackgroundFrameLeftMargin = 1.0;
|
| +
|
| } // namespace
|
|
|
| BubbleDecoration::BubbleDecoration() : retina_baseline_offset_(0) {
|
| @@ -93,6 +99,13 @@ CGFloat BubbleDecoration::GetWidthForSpace(CGFloat width) {
|
| return kOmittedWidth;
|
| }
|
|
|
| +NSRect BubbleDecoration::GetBackgroundFrame(NSRect frame) {
|
| + NSRect background_frame = NSInsetRect(frame, 0.0, kBackgroundFrameYInset);
|
| + background_frame.origin.x += kBackgroundFrameLeftMargin;
|
| + background_frame.size.width -= kDividerPadding;
|
| + return background_frame;
|
| +}
|
| +
|
| void BubbleDecoration::DrawInFrame(NSRect frame, NSView* control_view) {
|
| const NSRect decoration_frame = NSInsetRect(frame, 0.0, kImageFrameYInset);
|
| CGFloat text_offset = NSMinX(decoration_frame);
|
|
|