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

Unified Diff: chrome/browser/ui/views/payments/payment_request_views_util.cc

Issue 2846053002: [Web Payments] Respect Harmony dialog width in Payment Request (Closed)
Patch Set: Change the dialog to Large Created 3 years, 8 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 | « chrome/browser/ui/views/payments/payment_request_views_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/payment_request_views_util.cc
diff --git a/chrome/browser/ui/views/payments/payment_request_views_util.cc b/chrome/browser/ui/views/payments/payment_request_views_util.cc
index 375ec5fe136e76eef67691390b2bd4e16e37d99c..01e73ffc4f6a46aeb4f33555e444c5241ce7736c 100644
--- a/chrome/browser/ui/views/payments/payment_request_views_util.cc
+++ b/chrome/browser/ui/views/payments/payment_request_views_util.cc
@@ -38,6 +38,7 @@
#include "ui/views/controls/styled_label.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/grid_layout.h"
+#include "ui/views/layout/layout_provider.h"
#include "ui/views/painter.h"
#include "ui/views/view.h"
@@ -127,6 +128,13 @@ class PaymentRequestRowBorderPainter : public views::Painter {
} // namespace
+int GetActualDialogWidth() {
+ constexpr int kDialogMinWidth = 512;
+ static int actual_width =
+ views::LayoutProvider::Get()->GetSnappedDialogWidth(kDialogMinWidth);
+ return actual_width;
+}
+
std::unique_ptr<views::View> CreateSheetHeaderView(
bool show_back_arrow,
const base::string16& title,
« no previous file with comments | « chrome/browser/ui/views/payments/payment_request_views_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698