Chromium Code Reviews| Index: chrome/browser/ui/views/infobars/infobar_view.cc |
| diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc |
| index f5cde5e814d8aeff283ce5a193c4ab85858f0d0e..97b944a811100e186d0fdd59b8c689d23d3442c7 100644 |
| --- a/chrome/browser/ui/views/infobars/infobar_view.cc |
| +++ b/chrome/browser/ui/views/infobars/infobar_view.cc |
| @@ -84,10 +84,14 @@ InfoBarView::InfoBarView(scoped_ptr<infobars::InfoBarDelegate> delegate) |
| set_owned_by_client(); // InfoBar deletes itself at the appropriate time. |
| set_background( |
| new InfoBarBackground(infobars::InfoBar::delegate()->GetInfoBarType())); |
| + SetEventTargeter(make_scoped_ptr(new views::ViewTargeter(this))); |
| AddChildView(child_container_); |
| if (ui::MaterialDesignController::IsModeMaterial()) { |
| + SetPaintToLayer(true); |
| + layer()->SetFillsBoundsOpaquely(false); |
| + |
| child_container_->SetPaintToLayer(true); |
| child_container_->layer()->SetMasksToBounds(true); |
| // Since MD doesn't use a gradient, we can set a solid bg color. |
| @@ -429,3 +433,9 @@ void InfoBarView::OnWillChangeFocus(View* focused_before, View* focused_now) { |
| NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); |
| } |
| } |
| + |
| +bool InfoBarView::DoesIntersectRect(const View* target, |
| + const gfx::Rect& rect) const { |
| + DCHECK_EQ(this, target); |
| + return rect.CenterPoint().y() >= arrow_height(); |
|
Peter Kasting
2016/03/08 01:08:17
This doesn't seem right... if the goal is to allow
Evan Stade
2016/03/08 01:43:29
ditto to my other comment. The two behaviors descr
Peter Kasting
2016/03/08 03:11:04
After reading your other comments, it seems like y
tdanderson
2016/03/14 17:53:03
This should also use rect.bottom() instead of rect
|
| +} |