| 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.
|
|
|