Index: ui/views/bubble/bubble_frame_view.h |
diff --git a/ui/views/bubble/bubble_frame_view.h b/ui/views/bubble/bubble_frame_view.h |
index a17a4f8f487eede0823a540e7654ceee3544b2cd..9413a9d78a099c56e00cfac7e7112cfe328c58b2 100644 |
--- a/ui/views/bubble/bubble_frame_view.h |
+++ b/ui/views/bubble/bubble_frame_view.h |
@@ -6,6 +6,7 @@ |
#define UI_VIEWS_BUBBLE_BUBBLE_FRAME_VIEW_H_ |
#include "base/basictypes.h" |
+#include "base/callback.h" |
#include "base/compiler_specific.h" |
#include "base/gtest_prod_util.h" |
#include "ui/gfx/insets.h" |
@@ -79,6 +80,8 @@ class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView, |
gfx::Size client_size, |
bool adjust_if_offscreen); |
+ void SetCloseCallback(base::Closure c) {callback_before_close_ = c;} |
Alexei Svitkine (slow)
2014/07/02 15:07:26
This should use hacker_style (i.e. set_before_clos
yao
2014/07/07 17:47:45
Done.
|
+ |
protected: |
// Returns the available screen bounds if the frame were to show in |rect|. |
virtual gfx::Rect GetAvailableScreenBounds(const gfx::Rect& rect); |
@@ -114,6 +117,10 @@ class VIEWS_EXPORT BubbleFrameView : public NonClientFrameView, |
// (x) close button. |
View* titlebar_extra_view_; |
+ // The callback function is executed before bubble is closed. It can be used |
+ // to customize bubble's close behavior. |
+ base::Closure callback_before_close_; |
Alexei Svitkine (slow)
2014/07/02 15:07:26
Nit: Rename to before_close_callback_
yao
2014/07/07 17:47:45
Done.
|
+ |
DISALLOW_COPY_AND_ASSIGN(BubbleFrameView); |
}; |