| Index: ui/views/bubble/tray_bubble_view.h
|
| diff --git a/ui/views/bubble/tray_bubble_view.h b/ui/views/bubble/tray_bubble_view.h
|
| index ccd7b77a0a3f2ea52aa6009815b20b364f96b713..1333ed804c129740b5786f08212cfe80adebe00d 100644
|
| --- a/ui/views/bubble/tray_bubble_view.h
|
| +++ b/ui/views/bubble/tray_bubble_view.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/optional.h"
|
| +#include "ui/gfx/native_widget_types.h"
|
| #include "ui/views/bubble/bubble_dialog_delegate.h"
|
| #include "ui/views/mouse_watcher.h"
|
| #include "ui/views/views_export.h"
|
| @@ -61,15 +62,6 @@ class VIEWS_EXPORT TrayBubbleView : public BubbleDialogDelegateView,
|
| // accessible name for the bubble.
|
| virtual base::string16 GetAccessibleNameForBubble() = 0;
|
|
|
| - // Called before Widget::Init() on |bubble_widget|. Allows |params| to be
|
| - // modified.
|
| - // TODO(jamescook): Eliminate this method. It was introduced to let mash set
|
| - // the widget container back when mash could not use aura::Window. Now the
|
| - // anchor view should be sufficient.
|
| - virtual void OnBeforeBubbleWidgetInit(Widget* anchor_widget,
|
| - Widget* bubble_widget,
|
| - Widget::InitParams* params) const = 0;
|
| -
|
| // Called when a bubble wants to hide/destroy itself (e.g. last visible
|
| // child view was closed).
|
| virtual void HideBubble(const TrayBubbleView* bubble_view) = 0;
|
| @@ -79,8 +71,11 @@ class VIEWS_EXPORT TrayBubbleView : public BubbleDialogDelegateView,
|
| };
|
|
|
| struct VIEWS_EXPORT InitParams {
|
| - InitParams(AnchorAlignment anchor_alignment, int min_width, int max_width);
|
| + InitParams();
|
| InitParams(const InitParams& other);
|
| + Delegate* delegate;
|
| + gfx::NativeWindow parent_window;
|
| + View* anchor_view;
|
| AnchorAlignment anchor_alignment;
|
| int min_width;
|
| int max_width;
|
| @@ -91,11 +86,7 @@ class VIEWS_EXPORT TrayBubbleView : public BubbleDialogDelegateView,
|
| base::Optional<SkColor> bg_color;
|
| };
|
|
|
| - // Constructs and returns a TrayBubbleView. |init_params| may be modified.
|
| - static TrayBubbleView* Create(views::View* anchor,
|
| - Delegate* delegate,
|
| - InitParams* init_params);
|
| -
|
| + explicit TrayBubbleView(const InitParams& init_params);
|
| ~TrayBubbleView() override;
|
|
|
| // Returns whether a tray bubble is active.
|
| @@ -152,10 +143,6 @@ class VIEWS_EXPORT TrayBubbleView : public BubbleDialogDelegateView,
|
| void MouseMovedOutOfHost() override;
|
|
|
| protected:
|
| - TrayBubbleView(views::View* anchor,
|
| - Delegate* delegate,
|
| - const InitParams& init_params);
|
| -
|
| // Overridden from views::BubbleDialogDelegateView.
|
| int GetDialogButtons() const override;
|
|
|
|
|