Index: chrome/browser/ui/views/page_info/page_info_bubble_view.cc |
diff --git a/chrome/browser/ui/views/page_info/page_info_bubble_view.cc b/chrome/browser/ui/views/page_info/page_info_bubble_view.cc |
index 633de3cfbff781be81d8eed9b7e941d62982149d..5054dfc273e091cb4fa67e17c6278a89c76b1f98 100644 |
--- a/chrome/browser/ui/views/page_info/page_info_bubble_view.cc |
+++ b/chrome/browser/ui/views/page_info/page_info_bubble_view.cc |
@@ -45,6 +45,7 @@ |
#include "ui/gfx/geometry/insets.h" |
#include "ui/gfx/image/image.h" |
#include "ui/views/border.h" |
+#include "ui/views/bubble/bubble_frame_view.h" |
#include "ui/views/controls/button/image_button.h" |
#include "ui/views/controls/button/md_text_button.h" |
#include "ui/views/controls/image_view.h" |
@@ -541,6 +542,15 @@ base::string16 PageInfoBubbleView::GetWindowTitle() const { |
return summary_text_; |
} |
+void PageInfoBubbleView::AddedToWidget() { |
+ std::unique_ptr<views::Label> title = |
+ views::BubbleFrameView::CreateDefaultTitleLabel(GetWindowTitle()); |
+ title->SetFontList( |
+ ui::ResourceBundle::GetSharedInstance().GetFontListWithDelta( |
+ kSummaryFontSizeDelta)); |
+ GetBubbleFrameView()->SetTitleView(std::move(title)); |
+} |
+ |
bool PageInfoBubbleView::ShouldShowCloseButton() const { |
return true; |
} |
@@ -555,11 +565,6 @@ int PageInfoBubbleView::GetDialogButtons() const { |
return ui::DIALOG_BUTTON_NONE; |
} |
-const gfx::FontList& PageInfoBubbleView::GetTitleFontList() const { |
- return ui::ResourceBundle::GetSharedInstance().GetFontListWithDelta( |
- kSummaryFontSizeDelta); |
-} |
- |
void PageInfoBubbleView::ButtonPressed(views::Button* button, |
const ui::Event& event) { |
DCHECK_EQ(VIEW_ID_PAGE_INFO_BUTTON_CLOSE, button->id()); |
@@ -696,7 +701,8 @@ void PageInfoBubbleView::SetIdentityInfo(const IdentityInfo& identity_info) { |
identity_info.GetSecurityDescription(); |
summary_text_ = security_description->summary; |
- GetWidget()->UpdateWindowTitle(); |
+ static_cast<views::Label*>(GetBubbleFrameView()->title()) |
+ ->SetText(GetWindowTitle()); |
if (identity_info.certificate) { |
certificate_ = identity_info.certificate; |