| Index: ui/views/bubble/bubble_frame_view.cc
|
| diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc
|
| index 384c4fa46a8ddb4cbe788c33d71d769e75493e33..9e50d30619729c1ac89380637c1bd658bf3d7493 100644
|
| --- a/ui/views/bubble/bubble_frame_view.cc
|
| +++ b/ui/views/bubble/bubble_frame_view.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <algorithm>
|
|
|
| +#include "base/bind.h"
|
| #include "grit/ui_resources.h"
|
| #include "ui/base/hit_test.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| @@ -68,7 +69,8 @@ BubbleFrameView::BubbleFrameView(const gfx::Insets& content_margins)
|
| content_margins_(content_margins),
|
| title_(NULL),
|
| close_(NULL),
|
| - titlebar_extra_view_(NULL) {
|
| + titlebar_extra_view_(NULL),
|
| + before_close_callback_(base::Closure()) {
|
| ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
|
| title_ = new Label(base::string16(),
|
| rb.GetFontList(ui::ResourceBundle::MediumFont));
|
| @@ -238,8 +240,11 @@ void BubbleFrameView::OnNativeThemeChanged(const ui::NativeTheme* theme) {
|
| }
|
|
|
| void BubbleFrameView::ButtonPressed(Button* sender, const ui::Event& event) {
|
| - if (sender == close_)
|
| + if (sender == close_) {
|
| + if (!before_close_callback_.is_null())
|
| + before_close_callback_.Run();
|
| GetWidget()->Close();
|
| + }
|
| }
|
|
|
| void BubbleFrameView::SetBubbleBorder(scoped_ptr<BubbleBorder> border) {
|
|
|