| 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..81042a839e1dc55c79d2e3b6af1f2fc76cb62a4b 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,23 +71,22 @@ 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);
|
| - AnchorAlignment anchor_alignment;
|
| - int min_width;
|
| - int max_width;
|
| - int max_height;
|
| - bool can_activate;
|
| - bool close_on_deactivate;
|
| + Delegate* delegate = nullptr;
|
| + gfx::NativeWindow parent_window = nullptr;
|
| + View* anchor_view = nullptr;
|
| + AnchorAlignment anchor_alignment = ANCHOR_ALIGNMENT_BOTTOM;
|
| + int min_width = 0;
|
| + int max_width = 0;
|
| + int max_height = 0;
|
| + bool can_activate = false;
|
| + bool close_on_deactivate = true;
|
| // If not provided, the bg color will be derived from the NativeTheme.
|
| 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;
|
|
|
|
|