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

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

Issue 2779283002: [Web Payments] Implement the CVC Unmask dialog. (Closed)
Patch Set: Created 3 years, 9 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
Index: chrome/browser/ui/views/payments/payment_request_sheet_controller.cc
diff --git a/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc b/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc
index 03a6d0bb6a3eb29c387bd52f0bf0180bbbac8be0..5bb346d65899c2c7d6b043b12f847c2abb6b8d57 100644
--- a/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc
+++ b/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc
@@ -100,13 +100,22 @@ PaymentRequestSheetController::CreatePaymentView() {
// |content_view| will go into a views::ScrollView so it needs to be sized now
// otherwise it'll be sized to the ScrollView's viewport height, preventing
// the scroll bar from ever being shown.
- content_view_->SizeToPreferredSize();
+ views::View* pane = new views::View;
Mathieu 2017/03/30 14:37:32 can this be a separate change? this is to limit th
+ views::GridLayout* pane_layout = new views::GridLayout(pane);
+ views::ColumnSet* pane_columns = pane_layout->AddColumnSet(0);
+ pane_columns->AddColumn(views::GridLayout::Alignment::FILL,
+ views::GridLayout::Alignment::LEADING, 0,
+ views::GridLayout::SizeType::FIXED, 450, 450);
+ pane->SetLayoutManager(pane_layout);
+ pane_layout->StartRow(0, 0);
+ pane_layout->AddView(content_view_);
+ pane->SizeToPreferredSize();
std::unique_ptr<views::ScrollView> scroll =
base::MakeUnique<views::ScrollView>();
scroll->EnableViewPortLayer();
scroll->set_hide_horizontal_scrollbar(true);
- scroll->SetContents(content_view_);
+ scroll->SetContents(pane);
layout->AddView(scroll.release());
layout->StartRow(0, 0);

Powered by Google App Engine
This is Rietveld 408576698