| Index: ui/views/bubble/bubble_delegate.h
|
| diff --git a/ui/views/bubble/bubble_delegate.h b/ui/views/bubble/bubble_delegate.h
|
| index 3bc73f8c729d0983f07d044dc78186e48cc472c5..1bd963405810e9e01b9891e584f1d940954628af 100644
|
| --- a/ui/views/bubble/bubble_delegate.h
|
| +++ b/ui/views/bubble/bubble_delegate.h
|
| @@ -28,6 +28,13 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
|
| // Internal class name.
|
| static const char kViewClassName[];
|
|
|
| + enum class CloseReason {
|
| + DEACTIVATION,
|
| + ESCAPE,
|
| + CLOSE_BUTTON,
|
| + UNKNOWN,
|
| + };
|
| +
|
| BubbleDelegateView();
|
| BubbleDelegateView(View* anchor_view, BubbleBorder::Arrow arrow);
|
| ~BubbleDelegateView() override;
|
| @@ -44,6 +51,7 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
|
| const char* GetClassName() const override;
|
|
|
| // WidgetObserver overrides:
|
| + void OnWidgetClosing(Widget* widget) override;
|
| void OnWidgetDestroying(Widget* widget) override;
|
| void OnWidgetVisibilityChanging(Widget* widget, bool visible) override;
|
| void OnWidgetVisibilityChanged(Widget* widget, bool visible) override;
|
| @@ -93,6 +101,8 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
|
| bool adjust_if_offscreen() const { return adjust_if_offscreen_; }
|
| void set_adjust_if_offscreen(bool adjust) { adjust_if_offscreen_ = adjust; }
|
|
|
| + CloseReason close_reason() const { return close_reason_; }
|
| +
|
| // Get the arrow's anchor rect in screen space.
|
| virtual gfx::Rect GetAnchorRect() const;
|
|
|
| @@ -192,6 +202,8 @@ class VIEWS_EXPORT BubbleDelegateView : public WidgetDelegateView,
|
| // Parent native window of the bubble.
|
| gfx::NativeView parent_window_;
|
|
|
| + CloseReason close_reason_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(BubbleDelegateView);
|
| };
|
|
|
|
|