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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm

Issue 2524223002: MacViews: Anchor bubbles according to the MD spec. (Closed)
Patch Set: Zap unnecessary patchset dep Created 4 years 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/autocomplete_text_field_cell.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
index 1a70f222639746c6ba5292f6d66ef47db6a05eaa..3046c087b36d966ff5814884b4a540c483d1e439 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
@@ -242,6 +242,17 @@ size_t CalculatePositionsInFrame(
return NSZeroRect;
}
+- (NSRect)backgroundFrameForDecoration:(LocationBarDecoration*)decoration
+ inFrame:(NSRect)cellFrame
+ isLeftDecoration:(BOOL*)isLeftDecoration {
+ NSRect decorationFrame =
+ [self frameForDecoration:decoration inFrame:cellFrame];
+ *isLeftDecoration =
+ std::find(leftDecorations_.begin(), leftDecorations_.end(), decoration) !=
+ leftDecorations_.end();
+ return decoration->GetBackgroundFrame(decorationFrame);
+}
+
// Overriden to account for the decorations.
- (NSRect)textFrameForFrame:(NSRect)cellFrame {
// Get the frame adjusted for decorations.
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h ('k') | ui/views/bubble/bubble_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698