Index: chrome/browser/ui/views/global_error_bubble_view.cc |
diff --git a/chrome/browser/ui/views/global_error_bubble_view.cc b/chrome/browser/ui/views/global_error_bubble_view.cc |
index b4eee9fe2c08966e578db2612a0a4d25061ec5ef..601ca382013dbeb580ee2c6cd4df8a2dbab97d93 100644 |
--- a/chrome/browser/ui/views/global_error_bubble_view.cc |
+++ b/chrome/browser/ui/views/global_error_bubble_view.cc |
@@ -102,7 +102,10 @@ GlobalErrorBubbleView::GlobalErrorBubbleView( |
accept_button->SetIsDefault(true); |
accept_button->set_tag(TAG_ACCEPT_BUTTON); |
if (error_->ShouldAddElevationIconToAcceptButton()) |
- elevation_icon_setter_.reset(new ElevationIconSetter(accept_button.get())); |
+ elevation_icon_setter_.reset( |
+ new ElevationIconSetter( |
+ accept_button.get(), |
+ base::Bind(&GlobalErrorBubbleView::UpdateBound, AsWeakPtr()))); |
Peter Kasting
2015/02/21 01:06:27
Why not just pass &views::BubbleDelegateView::Size
xiaoling
2015/02/21 01:15:00
Because the function is the protected. Is there an
Peter Kasting
2015/02/21 01:21:49
Sorry, try passing &GlobalErrorBubbleView::SizeToC
xiaoling
2015/02/23 18:19:41
Thanks for the trick. It worked, although I'm not
|
base::string16 cancel_string(error_->GetBubbleViewCancelButtonLabel()); |
scoped_ptr<views::LabelButton> cancel_button; |
@@ -169,6 +172,10 @@ GlobalErrorBubbleView::GlobalErrorBubbleView( |
set_close_on_deactivate(error_->ShouldCloseOnDeactivate()); |
} |
+void GlobalErrorBubbleView::UpdateBound() { |
+ views::BubbleDelegateView::SizeToContents(); |
+} |
+ |
GlobalErrorBubbleView::~GlobalErrorBubbleView() { |
// |elevation_icon_setter_| references |accept_button_|, so make sure it is |
// destroyed before |accept_button_|. |