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

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

Issue 2755493005: [Web Payments] Consolidate list code. (Closed)
Patch Set: Fix test compile. 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/profile_list_view_controller.cc ('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 053e06947f03283ab771a66a5b7437fe5bfe02f5..19194f3e45a43f19a734a893964a8bfbef95b9a9 100644
--- a/chrome/browser/ui/views/payments/shipping_option_view_controller.cc
+++ b/chrome/browser/ui/views/payments/shipping_option_view_controller.cc
@@ -25,7 +25,7 @@ class ShippingOptionItem : public PaymentRequestItemList::Item {
private:
// payments::PaymentRequestItemList::Item:
- std::unique_ptr<views::View> CreateItemView() override {
+ std::unique_ptr<views::View> CreateContentView() override {
return CreateShippingOptionLabel(
shipping_option_,
spec()->GetFormattedCurrencyAmount(shipping_option_->amount->value));
@@ -33,6 +33,16 @@ class ShippingOptionItem : public PaymentRequestItemList::Item {
void SelectedStateChanged() override {}
+ bool CanBeSelected() const override {
+ // Shipping options are vetted by the website; they're all OK to select.
+ return true;
+ }
+
+ void PerformSelectionFallback() override {
+ // Since CanBeSelected() is always true, this should never be called.
+ NOTREACHED();
+ }
+
mojom::PaymentShippingOption* shipping_option_;
DISALLOW_COPY_AND_ASSIGN(ShippingOptionItem);
« no previous file with comments | « chrome/browser/ui/views/payments/profile_list_view_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698