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

Unified Diff: chrome/browser/ui/views/chooser_content_view.cc

Issue 2478863003: Fix the Web Bluetooth chooser when it is used on Chrome apps on non-Mac (Closed)
Patch Set: added code to handle the footnote link pointer ownership Created 4 years, 1 month 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: chrome/browser/ui/views/chooser_content_view.cc
diff --git a/chrome/browser/ui/views/chooser_content_view.cc b/chrome/browser/ui/views/chooser_content_view.cc
index 4994e715fd19312182eab62b0a1f09e60bfb414b..423a3622e092cae5f481cdfb7fc30d60e6fb61b3 100644
--- a/chrome/browser/ui/views/chooser_content_view.cc
+++ b/chrome/browser/ui/views/chooser_content_view.cc
@@ -86,6 +86,10 @@ ChooserContentView::ChooserContentView(
views::StyledLabel::RangeStyleInfo::CreateForLink());
turn_adapter_off_help_->SetVisible(false);
AddChildView(turn_adapter_off_help_);
+ footnote_link_ptr_.reset(new views::StyledLabel(help_text_, this));
+ footnote_link_ = footnote_link_ptr_.get();
+ footnote_link_->AddStyleRange(
+ help_text_range_, views::StyledLabel::RangeStyleInfo::CreateForLink());
}
ChooserContentView::~ChooserContentView() {
@@ -280,10 +284,7 @@ bool ChooserContentView::IsDialogButtonEnabled(ui::DialogButton button) const {
}
views::StyledLabel* ChooserContentView::CreateFootnoteView() {
sky 2016/11/08 05:04:19 I find the usage of footnote_link_ and footnote_li
juncai 2016/11/08 19:43:26 That sounds better. I modified the ChooserContents
- footnote_link_ = new views::StyledLabel(help_text_, this);
- footnote_link_->AddStyleRange(
- help_text_range_, views::StyledLabel::RangeStyleInfo::CreateForLink());
- return footnote_link_;
+ return footnote_link_ptr_.release();
}
void ChooserContentView::Accept() {
« no previous file with comments | « chrome/browser/ui/views/chooser_content_view.h ('k') | chrome/browser/ui/views/constrained_web_dialog_delegate_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698