Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1229)

Unified Diff: ui/views/bubble/tray_bubble_view.h

Issue 2092473002: Convert TrayBubbleView to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@traybubblewrapper
Patch Set: review feedback Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.h ('k') | ui/views/bubble/tray_bubble_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b24a2e90eef7bcd76a2649bb022b19325268cfcb..4712e6a756fde26a314531568ae14b91ab2d75e3 100644
--- a/ui/views/bubble/tray_bubble_view.h
+++ b/ui/views/bubble/tray_bubble_view.h
@@ -81,6 +81,12 @@ class VIEWS_EXPORT TrayBubbleView : public views::BubbleDialogDelegateView,
AnchorType anchor_type,
AnchorAlignment anchor_alignment) const = 0;
+ // Called before Widget::Init() on |bubble_widget|. Allows |params| to be
+ // modified.
+ 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;
@@ -113,9 +119,8 @@ class VIEWS_EXPORT TrayBubbleView : public views::BubbleDialogDelegateView,
views::BubbleBorder::BubbleAlignment arrow_alignment;
};
- // Constructs and returns a TrayBubbleView. init_params may be modified.
- static TrayBubbleView* Create(gfx::NativeView parent_window,
- views::View* anchor,
+ // Constructs and returns a TrayBubbleView. |init_params| may be modified.
+ static TrayBubbleView* Create(views::View* anchor,
Delegate* delegate,
InitParams* init_params);
@@ -157,6 +162,8 @@ class VIEWS_EXPORT TrayBubbleView : public views::BubbleDialogDelegateView,
// Overridden from views::BubbleDialogDelegateView.
gfx::Rect GetAnchorRect() const override;
+ void OnBeforeBubbleWidgetInit(Widget::InitParams* params,
+ Widget* bubble_widget) const override;
// Overridden from views::View.
gfx::Size GetPreferredSize() const override;
@@ -170,8 +177,7 @@ class VIEWS_EXPORT TrayBubbleView : public views::BubbleDialogDelegateView,
void MouseMovedOutOfHost() override;
protected:
- TrayBubbleView(gfx::NativeView parent_window,
- views::View* anchor,
+ TrayBubbleView(views::View* anchor,
Delegate* delegate,
const InitParams& init_params);
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.h ('k') | ui/views/bubble/tray_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698