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

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

Issue 2840013002: [Web Payments] Layout sheets after the width of their parent is known (Closed)
Patch Set: Address comment. 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 | « no previous file | 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_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 894156103be555dd21c49cc3bfb570e2eb29979e..a28428bfbe20c9d645161cd6647b9608c71c1f4c 100644
--- a/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc
+++ b/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc
@@ -28,12 +28,9 @@ PaymentRequestSheetController::PaymentRequestSheetController(
PaymentRequestSheetController::~PaymentRequestSheetController() {}
std::unique_ptr<views::View> PaymentRequestSheetController::CreateView() {
- // This is owned by its parent.
- content_view_ = new views::View;
-
- FillContentView(content_view_);
-
- return CreatePaymentView();
+ std::unique_ptr<views::View> view = CreatePaymentView();
+ UpdateContentView();
+ return view;
}
void PaymentRequestSheetController::UpdateContentView() {
@@ -114,6 +111,8 @@ PaymentRequestSheetController::CreatePaymentView() {
0, views::GridLayout::SizeType::FIXED, kDialogWidth, kDialogWidth);
pane_->SetLayoutManager(pane_layout);
pane_layout->StartRow(0, 0);
+ // This is owned by its parent. It's the container passed to FillContentView.
+ content_view_ = new views::View;
pane_layout->AddView(content_view_);
pane_->SizeToPreferredSize();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698