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

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

Issue 233623002: Shows the info bubble when the location bar icon is clicked in the origin chip. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase. Created 6 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 f70f7d9f59b2bddc4ee9b88b4c5d88d26a06b443..ae5ee2d4dd14ea7abcc6ee528305b2383f814c17 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
@@ -164,7 +164,8 @@ LocationBarViewMac::LocationBarViewMac(AutocompleteTextField* field,
!browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP)];
if (chrome::ShouldDisplayOriginChipV2())
- origin_chip_decoration_.reset(new OriginChipDecoration(this));
+ origin_chip_decoration_.reset(new OriginChipDecoration(
+ this, location_icon_decoration_.get()));
}
LocationBarViewMac::~LocationBarViewMac() {
@@ -305,7 +306,7 @@ ExtensionAction* LocationBarViewMac::GetVisiblePageAction(size_t index) {
void LocationBarViewMac::TestPageActionPressed(size_t index) {
DCHECK_LT(index, page_action_decorations_.size());
if (index < page_action_decorations_.size())
- page_action_decorations_[index]->OnMousePressed(NSZeroRect);
+ page_action_decorations_[index]->OnMousePressed(NSZeroRect, NSZeroPoint);
}
bool LocationBarViewMac::GetBookmarkStarVisibility() {
@@ -362,7 +363,9 @@ NSPoint LocationBarViewMac::GetTranslateBubblePoint() const {
}
NSPoint LocationBarViewMac::GetPageInfoBubblePoint() const {
- if (ev_bubble_decoration_->IsVisible()) {
+ if (origin_chip_decoration_ && origin_chip_decoration_->IsVisible()) {
+ return [field_ bubblePointForDecoration:origin_chip_decoration_.get()];
+ } else if (ev_bubble_decoration_->IsVisible()) {
return [field_ bubblePointForDecoration:ev_bubble_decoration_.get()];
} else {
return [field_ bubblePointForDecoration:location_icon_decoration_.get()];

Powered by Google App Engine
This is Rietveld 408576698