123456789101112131415161718192021222324252627282930313233 |
- ## This patch removes the focus ring from the location bar.
- #
- # Alternatively the color could be changed with focus_ring_->SetColor(SkColor).
- --- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
- +++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
- @@ -152,26 +152,6 @@ LocationBarView::LocationBarView(Browser
- profile_(profile),
- delegate_(delegate),
- is_popup_mode_(is_popup_mode) {
- - if (!is_popup_mode_) {
- - focus_ring_ = views::FocusRing::Install(this);
- - focus_ring_->SetHasFocusPredicate([](View* view) -> bool {
- - DCHECK(views::IsViewClass<LocationBarView>(view));
- - auto* v = static_cast<LocationBarView*>(view);
- -
- - // Show focus ring when the Omnibox is visibly focused and the popup is
- - // closed.
- - return v->omnibox_view_->model()->is_caret_visible() &&
- - !v->GetOmniboxPopupView()->IsOpen();
- - });
- -
- - focus_ring_->SetPathGenerator(
- - std::make_unique<views::PillHighlightPathGenerator>());
- -
- -#if defined(OS_MAC)
- - geolocation_permission_observation_.Observe(
- - g_browser_process->platform_part()->location_permission_manager());
- -#endif
- - }
- }
-
- LocationBarView::~LocationBarView() = default;
|