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

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

Issue 2768133002: [Web Payments] Refactor sheet display to allow updating view content (Closed)
Patch Set: Add comments. 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
« no previous file with comments | « chrome/browser/ui/views/payments/shipping_option_view_controller.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/shipping_option_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/shipping_option_view_controller.cc b/chrome/browser/ui/views/payments/shipping_option_view_controller.cc
index 59a13365c3fa8ea30b66487adcdab99bc5c7fa2e..c1c9d8135a2a4a481362044b41730793682b8dcf 100644
--- a/chrome/browser/ui/views/payments/shipping_option_view_controller.cc
+++ b/chrome/browser/ui/views/payments/shipping_option_view_controller.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/ui/views/payments/payment_request_views_util.h"
#include "components/payments/content/payment_request_spec.h"
#include "components/payments/content/payment_request_state.h"
+#include "ui/views/layout/fill_layout.h"
namespace payments {
@@ -73,14 +74,13 @@ ShippingOptionViewController::ShippingOptionViewController(
ShippingOptionViewController::~ShippingOptionViewController() {}
-std::unique_ptr<views::View> ShippingOptionViewController::CreateView() {
- std::unique_ptr<views::View> list_view =
- shipping_option_list_.CreateListView();
- return CreatePaymentView(
- CreateSheetHeaderView(
- true, GetShippingOptionSectionString(spec()->options().shipping_type),
- this),
- std::move(list_view));
+base::string16 ShippingOptionViewController::GetSheetTitle() {
+ return GetShippingOptionSectionString(spec()->options().shipping_type);
+}
+
+void ShippingOptionViewController::FillContentView(views::View* content_view) {
+ content_view->SetLayoutManager(new views::FillLayout);
+ content_view->AddChildView(shipping_option_list_.CreateListView().release());
}
std::unique_ptr<views::View>
« no previous file with comments | « chrome/browser/ui/views/payments/shipping_option_view_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698