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

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

Issue 2880433002: views: don't snap dialogs with no buttons (Closed)
Patch Set: 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_dialog_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/bubble/bubble_dialog_delegate.cc
diff --git a/ui/views/bubble/bubble_dialog_delegate.cc b/ui/views/bubble/bubble_dialog_delegate.cc
index 0f239090451351e9ed2b1b2358027eb24c4f6342..3e18b302ea38730e4fffe4f7d1f1e864db5a7308 100644
--- a/ui/views/bubble/bubble_dialog_delegate.cc
+++ b/ui/views/bubble/bubble_dialog_delegate.cc
@@ -87,6 +87,10 @@ Widget* BubbleDialogDelegateView::CreateBubble(
return bubble_widget;
}
+bool BubbleDialogDelegateView::ShouldSnapFrameWidth() const {
+ return GetDialogButtons() != ui::DIALOG_BUTTON_NONE;
Peter Kasting 2017/05/10 20:41:24 Why do this in BubbleDialogDelegateView rather tha
Elly Fong-Jones 2017/05/10 21:06:49 Oops! It should definitely be on DialogDelegateVie
+}
+
BubbleDialogDelegateView* BubbleDialogDelegateView::AsBubbleDialogDelegate() {
return this;
}
« no previous file with comments | « ui/views/bubble/bubble_dialog_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698