Chromium Code Reviews| Index: chrome/browser/ui/views/frame/browser_view.cc |
| diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc |
| index f4dbf87a9b3440d7ce19808cf32bf6b2c92f3fe7..7656e826573b20406c8fde6bfb526819b4c150ea 100644 |
| --- a/chrome/browser/ui/views/frame/browser_view.cc |
| +++ b/chrome/browser/ui/views/frame/browser_view.cc |
| @@ -124,7 +124,6 @@ |
| #include "ui/base/accelerators/accelerator.h" |
| #include "ui/base/hit_test.h" |
| #include "ui/base/l10n/l10n_util.h" |
| -#include "ui/base/material_design/material_design_controller.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/base/theme_provider.h" |
| #include "ui/content_accelerators/accelerator_util.h" |
| @@ -1275,13 +1274,9 @@ void BrowserView::ShowWebsiteSettings( |
| content::WebContents* web_contents, |
| const GURL& virtual_url, |
| const security_state::SecurityInfo& security_info) { |
| - views::View* popup_anchor = nullptr; |
| - if (ui::MaterialDesignController::IsSecondaryUiMaterial()) |
| - popup_anchor = toolbar_->location_bar(); |
| - else |
| - popup_anchor = GetLocationBarView()->location_icon_view()->GetImageView(); |
| - |
| - WebsiteSettingsPopupView::ShowPopup(popup_anchor, gfx::Rect(), profile, |
| + views::View* anchor_view = |
| + GetLocationBarView()->GetSecurityBubbleAnchorView(); |
|
Peter Kasting
2017/02/13 21:36:31
Nit: Shorter to either use auto:
auto* anchor_vi
tapted
2017/02/14 04:00:27
Done.
|
| + WebsiteSettingsPopupView::ShowPopup(anchor_view, gfx::Rect(), profile, |
| web_contents, virtual_url, security_info); |
| } |
| @@ -2018,7 +2013,7 @@ void BrowserView::InfoBarContainerStateChanged(bool is_animating) { |
| bool BrowserView::DrawInfoBarArrows(int* x) const { |
| if (x) { |
| - gfx::Point anchor(toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
| + gfx::Point anchor(toolbar_->location_bar()->GetInfoBarAnchorPoint()); |
| ConvertPointToTarget(toolbar_->location_bar(), this, &anchor); |
| *x = anchor.x(); |
| } |
| @@ -2566,8 +2561,7 @@ int BrowserView::GetMaxTopInfoBarArrowHeight() { |
| // popup. |
| if (!IsFullscreen() && |
| !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
| - gfx::Point icon_bottom( |
| - toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
| + gfx::Point icon_bottom(toolbar_->location_bar()->GetInfoBarAnchorPoint()); |
| ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
| gfx::Point infobar_top; |
| ConvertPointToTarget(infobar_container_, this, &infobar_top); |