Chromium Code Reviews| Index: ui/views/bubble/bubble_delegate.cc |
| diff --git a/ui/views/bubble/bubble_delegate.cc b/ui/views/bubble/bubble_delegate.cc |
| index 55ce980289149c322219d60e35222009d4ee8614..68c35f2b2eb94acd048510abfc07ed808997aaac 100644 |
| --- a/ui/views/bubble/bubble_delegate.cc |
| +++ b/ui/views/bubble/bubble_delegate.cc |
| @@ -96,7 +96,16 @@ BubbleDelegateView::~BubbleDelegateView() { |
| Widget* BubbleDelegateView::CreateBubble(BubbleDelegateView* bubble_delegate) { |
| bubble_delegate->Init(); |
| // Get the latest anchor widget from the anchor view at bubble creation time. |
| - bubble_delegate->SetAnchorView(bubble_delegate->GetAnchorView()); |
| + views::View* anchor = bubble_delegate->GetAnchorView(); |
|
hcarmona
2015/02/28 00:24:53
Trybots hated this check. I'm removing it.
Are th
groby-ooo-7-16
2015/02/28 00:26:22
This statement does not make sense to me. What che
hcarmona
2015/02/28 01:14:16
I added the DCHECK on line 105 to avoid having a b
|
| + BubbleBorder::Arrow arrow = bubble_delegate->arrow(); |
| + |
| + // Anchor should always be visible when it has an arrow to avoid accidentally |
| + // showing a bubble with an arrow when the anchor is not visible. |
| + // ex: Bubble is anchored to lock button in omnibar while in fullscreen. |
| + DCHECK(arrow == BubbleBorder::NONE || arrow == BubbleBorder::FLOAT || |
|
groby-ooo-7-16
2015/02/28 00:25:12
Why verify this here, and not in the bubble where
hcarmona
2015/02/28 01:14:16
We can verify when drawing the bubble, but I imagi
|
| + anchor->IsDrawn()); |
| + |
| + bubble_delegate->SetAnchorView(anchor); |
| Widget* bubble_widget = CreateBubbleWidget(bubble_delegate); |
| #if defined(OS_WIN) |