Chromium Code Reviews| Index: chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc |
| diff --git a/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc b/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc |
| index 9addbb159e720ef07e16f56a3dee5bbbcecc0fbe..fd407b10c3dc8ad734236c16c65c4de18c8188b2 100644 |
| --- a/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc |
| +++ b/chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc |
| @@ -18,6 +18,7 @@ |
| #include "chrome/browser/ui/views/exclusive_access_bubble_views.h" |
| #include "chrome/browser/ui/views/frame/browser_view.h" |
| #include "chrome/browser/ui/views/frame/top_container_view.h" |
| +#include "chrome/browser/ui/views/harmony/layout_delegate.h" |
| #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| #include "chrome/browser/ui/views/location_bar/location_icon_view.h" |
| #include "chrome/browser/ui/website_settings/chooser_bubble_delegate.h" |
| @@ -54,6 +55,7 @@ class ChooserBubbleUiViewDelegate : public views::BubbleDialogDelegateView, |
| bool Accept() override; |
| bool Cancel() override; |
| bool Close() override; |
| + gfx::Size GetMinimumSize() const override; |
|
juncai
2017/02/13 22:42:21
It seems that setting the chooser size is similar
Elly Fong-Jones
2017/02/14 17:08:18
Moving it out of DeviceChooserContentView is delib
|
| // views::DialogDelegateView: |
| views::View* GetContentsView() override; |
| @@ -142,6 +144,15 @@ bool ChooserBubbleUiViewDelegate::Close() { |
| return true; |
| } |
| +gfx::Size ChooserBubbleUiViewDelegate::GetMinimumSize() const { |
| + const int kHeight = 150; |
|
juncai
2017/02/13 22:42:21
Change 150 to 320, same as:
https://cs.chromium.or
Elly Fong-Jones
2017/02/14 17:08:18
Done.
|
| + int width = LayoutDelegate::Get() |
|
juncai
2017/02/13 22:42:21
I did some test on my Linux machine and this width
Elly Fong-Jones
2017/02/14 17:08:18
Yep, this code is actually wrong. Fixed.
|
| + ? LayoutDelegate::Get()->GetDialogPreferredWidth( |
| + LayoutDelegate::DialogWidth::SMALL) |
|
juncai
2017/02/13 22:42:21
Change SMALL to MEDIUM, same as:
https://cs.chromi
Elly Fong-Jones
2017/02/14 17:08:18
Done.
|
| + : 300; |
|
juncai
2017/02/13 22:42:21
Change 300 to 402, same as:
https://cs.chromium.or
Elly Fong-Jones
2017/02/14 17:08:18
Done.
|
| + return gfx::Size(width, kHeight); |
| +} |
| + |
| views::View* ChooserBubbleUiViewDelegate::GetContentsView() { |
| return device_chooser_content_view_; |
| } |