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

Unified Diff: chrome/browser/ui/views/payments/payment_request_item_list.h

Issue 2872623002: [Web Payments] Add "pencil" edit button to lists. (Closed)
Patch Set: Rebase Created 3 years, 7 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_item_list.h
diff --git a/chrome/browser/ui/views/payments/payment_request_item_list.h b/chrome/browser/ui/views/payments/payment_request_item_list.h
index dee0a8a6855489b2f651e075e9ef95d4769a55e2..c5718ca6702d7ee35eda542a957dc9909ceef73f 100644
--- a/chrome/browser/ui/views/payments/payment_request_item_list.h
+++ b/chrome/browser/ui/views/payments/payment_request_item_list.h
@@ -36,7 +36,8 @@ class PaymentRequestItemList {
Item(PaymentRequestSpec* spec,
PaymentRequestState* state,
PaymentRequestItemList* list,
- bool selected);
+ bool selected,
+ bool show_edit_button);
~Item() override;
// Gets the view associated with this item. It's owned by this object so
@@ -89,6 +90,10 @@ class PaymentRequestItemList {
// false. This will usually be to display an editor.
virtual void PerformSelectionFallback() = 0;
+ // Called when the edit button is pressed. Subclasses should open the editor
+ // appropriate for the item they represent.
+ virtual void EditButtonPressed() = 0;
+
private:
// Creates and returns the view associated with this list item.
std::unique_ptr<views::View> CreateItemView();
@@ -102,6 +107,7 @@ class PaymentRequestItemList {
PaymentRequestItemList* list_;
std::unique_ptr<views::ImageView> checkmark_;
bool selected_;
+ bool show_edit_button_;
DISALLOW_COPY_AND_ASSIGN(Item);
};

Powered by Google App Engine
This is Rietveld 408576698