Chromium Code Reviews| 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..cbf166bcf46fa4e3fe78bb5164a96591cfa067dd 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. |
|
tmartino
2017/03/16 17:42:01
Omega nit: this should be a semicolon, not a comma
anthonyvd
2017/03/20 13:24:59
Done!
|
| + 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); |