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

Unified Diff: ui/views/bubble/bubble_frame_view.cc

Issue 2803293002: Create Bookmark Footnote desktop iOS promotion (Closed)
Patch Set: win only Created 3 years, 7 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_frame_view.h ('k') | ui/views/bubble/bubble_frame_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_frame_view.cc
diff --git a/ui/views/bubble/bubble_frame_view.cc b/ui/views/bubble/bubble_frame_view.cc
index c97fcf3eacc14dc428e4629fb94da1bcd6c5416a..b75f6746e25478da4cc241638ec58c5b9a5b1eca 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -363,6 +363,19 @@ void BubbleFrameView::OnNativeThemeChanged(const ui::NativeTheme* theme) {
}
}
+void BubbleFrameView::ViewHierarchyChanged(
+ const ViewHierarchyChangedDetails& details) {
+ if (!details.is_add && details.parent == footnote_container_ &&
+ footnote_container_->child_count() == 1 &&
+ details.child == footnote_container_->child_at(0)) {
+ // Setting the footnote_container_ to be hidden and null it. This will
+ // remove update the bubble to have no placeholder for the footnote and
+ // enable the destructor to delete the footnote_container_ later.
+ footnote_container_->SetVisible(false);
+ footnote_container_ = nullptr;
+ }
+}
+
void BubbleFrameView::OnPaint(gfx::Canvas* canvas) {
OnPaintBackground(canvas);
// Border comes after children.
« no previous file with comments | « ui/views/bubble/bubble_frame_view.h ('k') | ui/views/bubble/bubble_frame_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698