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

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

Issue 2907983002: Allow dialogs to use a custom View as their title. (Closed)
Patch Set: pass strings by reference Created 3 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
Index: ui/views/bubble/bubble_dialog_delegate.h
diff --git a/ui/views/bubble/bubble_dialog_delegate.h b/ui/views/bubble/bubble_dialog_delegate.h
index e027988df18d514041e98681d6e540a69cbdd964..23b01d5c39ae3873da288a7bdbbfd59170ce01ab 100644
--- a/ui/views/bubble/bubble_dialog_delegate.h
+++ b/ui/views/bubble/bubble_dialog_delegate.h
@@ -15,7 +15,6 @@
#include "ui/views/window/dialog_delegate.h"
namespace gfx {
-class FontList;
class Rect;
}
@@ -48,6 +47,7 @@ class VIEWS_EXPORT BubbleDialogDelegateView : public DialogDelegateView,
ClientView* CreateClientView(Widget* widget) override;
NonClientFrameView* CreateNonClientFrameView(Widget* widget) override;
const char* GetClassName() const override;
+ void AddedToWidget() override;
// WidgetObserver overrides:
void OnWidgetDestroying(Widget* widget) override;
@@ -130,9 +130,12 @@ class VIEWS_EXPORT BubbleDialogDelegateView : public DialogDelegateView,
// Get bubble bounds from the anchor rect and client view's preferred size.
virtual gfx::Rect GetBubbleBounds();
- // Return a FontList to use for the title of the bubble.
- // (The default is MediumFont).
- virtual const gfx::FontList& GetTitleFontList() const;
+ // Returns a custom view to use as the title of the dialog.
+ virtual View* CreateTitleView(const base::string16& title_text);
+
+ // Gives the custom title view returned from CreateTitleView, if there is one,
+ // to the BubbleFrameView.
+ void SetupTitleView();
Peter Kasting 2017/06/17 01:16:20 Nit: "Setup" implied to me that I could only call
Bret 2017/06/21 22:37:54 No longer relevant due to other changes.
// View overrides:
void OnNativeThemeChanged(const ui::NativeTheme* theme) override;

Powered by Google App Engine
This is Rietveld 408576698