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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_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
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index a37de8a5213311b147b0baffddc3d5117ff634b2..6465e4b11aae0bb815d8f0b33f0f04ceec1b82c4 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -75,6 +75,7 @@
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/dragdrop/drag_drop_types.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/compositor/paint_recorder.h"
@@ -363,7 +364,7 @@ void LocationBarView::SelectAll() {
omnibox_view_->SelectAll(true);
}
-gfx::Point LocationBarView::GetLocationBarAnchorPoint() const {
+gfx::Point LocationBarView::GetInfoBarAnchorPoint() const {
const views::ImageView* image = location_icon_view_->GetImageView();
const gfx::Rect image_bounds(image->GetImageBounds());
gfx::Point point(image_bounds.CenterPoint().x(), image_bounds.bottom());
@@ -371,6 +372,12 @@ gfx::Point LocationBarView::GetLocationBarAnchorPoint() const {
return point;
}
+views::View* LocationBarView::GetSecurityBubbleAnchorView() {
+ if (ui::MaterialDesignController::IsSecondaryUiMaterial())
+ return this;
+ return location_icon_view()->GetImageView();
+}
+
void LocationBarView::GetOmniboxPopupPositioningInfo(
gfx::Point* top_left_screen_coord,
int* popup_width,

Powered by Google App Engine
This is Rietveld 408576698