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

Unified Diff: chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc

Issue 2481413007: [MR UI] Set dialog width in MediaRouterDialogDelegate::GetDialogSize() if not set (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc
diff --git a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc
index de13d04f3e1011061e939c5d3ee6603d15308930..c56f32f20ed22a45d199f42fc9d52e3ae3225fbd 100644
--- a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc
+++ b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc
@@ -79,6 +79,10 @@ class MediaRouterDialogDelegate : public WebDialogDelegate {
void GetDialogSize(gfx::Size* size) const override {
DCHECK(size);
+ // We set the dialog width if it's not set, so that the dialog is
+ // center-aligned horizontally when it appears.
+ if (size->width() != kWidth)
+ size->set_width(kWidth);
// GetDialogSize() is called when the browser window resizes. We may want to
// update the maximum height of the dialog and scale the WebUI to the new
// height. |size| is not set because the dialog is auto-resizeable.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698