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

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

Issue 2882533003: [Mac] Hover/Active Omnibox Icon States for Secondary UI MD (Closed)
Patch Set: Nit 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_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 9416253c7bbda8d8189a5ecdcdec658025fb8971..720db262074f75d4851a0b95e9702e916bec0634 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -588,6 +588,21 @@ LocationBarDecoration* LocationBarViewMac::GetPageInfoDecoration() const {
return location_icon_decoration_.get();
}
+LocationBarDecoration* LocationBarViewMac::GetContentSettingDecoration(
+ NSPoint anchor) const {
+ NSPoint anchorInView =
+ ui::ConvertPointFromScreenToWindow([field_ window], anchor);
+ for (const auto& decoration : content_setting_decorations_) {
+ if (decoration->IsVisible() &&
+ NSEqualPoints([field_ arrowAnchorPointForDecoration:decoration.get()],
+ anchorInView)) {
+ return decoration.get();
+ }
+ }
+
+ return nullptr;
+}
+
NSImage* LocationBarViewMac::GetKeywordImage(const base::string16& keyword) {
const TemplateURL* template_url = TemplateURLServiceFactory::GetForProfile(
profile())->GetTemplateURLForKeyword(keyword);

Powered by Google App Engine
This is Rietveld 408576698