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

Unified Diff: chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc

Issue 2692113002: harmony: fix sizing on webusb chooser dialog (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | ui/views/bubble/bubble_dialog_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
}
« no previous file with comments | « no previous file | ui/views/bubble/bubble_dialog_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698