Chromium Code Reviews| 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()) |
|
Peter Kasting
2017/02/13 21:36:31
Nit: Should we be using LayoutDelegate::Get()->IsH
tapted
2017/02/14 04:00:27
hrm. I could go either way really, but I'm leaning
|
| + return this; |
| + return location_icon_view()->GetImageView(); |
|
Peter Kasting
2017/02/13 21:36:31
Nit: Fractionally simpler:
return ui::MaterialD
tapted
2017/02/14 04:00:27
Done.
tapted
2017/02/14 04:27:08
Un-Done :) - compiler wouldn't let me do this -- t
Peter Kasting
2017/02/14 04:30:00
I probably would have "static_cast<views::View*>(t
|
| +} |
| + |
| void LocationBarView::GetOmniboxPopupPositioningInfo( |
| gfx::Point* top_left_screen_coord, |
| int* popup_width, |