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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2693803002: Fix position of permission bubbles anchored off the padlock. (Closed)
Patch Set: fix ternary if-else (+respond to comments) Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/location_bar_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ec32f865d942f0addc61e5bcf46776894b9760e3 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,14 +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,
- web_contents, virtual_url, security_info);
+ WebsiteSettingsPopupView::ShowPopup(
+ GetLocationBarView()->GetSecurityBubbleAnchorView(), gfx::Rect(), profile,
+ web_contents, virtual_url, security_info);
}
void BrowserView::ShowAppMenu() {
@@ -2018,7 +2012,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 +2560,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);
« no previous file with comments | « no previous file | chrome/browser/ui/views/location_bar/location_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698