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

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

Issue 2863923002: Harmony: Don't snap the width of the chrome:// page info bubbles. (Closed)
Patch Set: Add a test whynot 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
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 2a15779b5543729fcd8f4cc993c380bb5905bf3e..c97fcf3eacc14dc428e4629fb94da1bcd6c5416a 100644
--- a/ui/views/bubble/bubble_frame_view.cc
+++ b/ui/views/bubble/bubble_frame_view.cc
@@ -533,7 +533,9 @@ gfx::Size BubbleFrameView::GetSizeForClientSize(
if (footnote_container_)
size.Enlarge(0, footnote_container_->GetHeightForWidth(size.width()));
- if (GetWidget()->widget_delegate()->AsDialogDelegate())
+ DialogDelegate* dialog_delegate =
+ GetWidget()->widget_delegate()->AsDialogDelegate();
+ if (dialog_delegate && dialog_delegate->ShouldSnapFrameWidth())
size.set_width(LayoutProvider::Get()->GetSnappedDialogWidth(size.width()));
return size;
« no previous file with comments | « chrome/browser/ui/views/page_info/page_info_bubble_view.cc ('k') | ui/views/bubble/bubble_frame_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698