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

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

Issue 3014029: [Mac] Make popup-blocked animation animate to content-setting icon. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: rsesek comments. 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
Index: chrome/browser/cocoa/location_bar/location_bar_view_mac.mm
diff --git a/chrome/browser/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/cocoa/location_bar/location_bar_view_mac.mm
index 896e3f50c2122d759b003d51b5636d5b7c3cb76b..1715f7a19103c88fa9e62642126513158ac6cb44 100644
--- a/chrome/browser/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/cocoa/location_bar/location_bar_view_mac.mm
@@ -324,6 +324,19 @@ NSPoint LocationBarViewMac::GetPageActionBubblePoint(
return [field_ convertPoint:bubble_point toView:nil];
}
+NSRect LocationBarViewMac::GetBlockedPopupRect() const {
+ const size_t kPopupIndex = CONTENT_SETTINGS_TYPE_POPUPS;
+ const LocationBarDecoration* decoration =
+ content_setting_decorations_[kPopupIndex];
+ if (!decoration || !decoration->IsVisible())
+ return NSZeroRect;
+
+ AutocompleteTextFieldCell* cell = [field_ cell];
+ const NSRect frame = [cell frameForDecoration:decoration
+ inFrame:[field_ bounds]];
+ return [field_ convertRect:frame toView:nil];
+}
+
ExtensionAction* LocationBarViewMac::GetPageAction(size_t index) {
if (index < page_action_decorations_.size())
return page_action_decorations_[index]->page_action();
« no previous file with comments | « chrome/browser/cocoa/location_bar/location_bar_view_mac.h ('k') | chrome/browser/cocoa/popup_blocked_animation_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698