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

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

Issue 2759253002: [Web Payments] Implement item selection in lists. (Closed)
Patch Set: 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
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 5ff845900f3169f2b31131fa6adab0bcb01c0c44..c89b69773c5b8575dadbac57525b6d2ca4d2b1bb 100644
--- a/chrome/browser/ui/views/payments/payment_request_item_list.h
+++ b/chrome/browser/ui/views/payments/payment_request_item_list.h
@@ -18,6 +18,7 @@ class View;
namespace payments {
+class PaymentRequestDialogView;
class PaymentRequestSpec;
class PaymentRequestState;
@@ -102,7 +103,7 @@ class PaymentRequestItemList {
DISALLOW_COPY_AND_ASSIGN(Item);
};
- PaymentRequestItemList();
+ explicit PaymentRequestItemList(PaymentRequestDialogView* dialog);
virtual ~PaymentRequestItemList();
// Adds an item to this list. |item->list()| should return this object.
@@ -113,8 +114,9 @@ class PaymentRequestItemList {
// hierarchy.
std::unique_ptr<views::View> CreateListView();
- // Deselects the currently selected item and selects |item| instead.
- void SelectItem(Item* item);
+ // Deselects the currently selected item and selects |item| instead. If
+ // |go_back| is true, also navigates the dialog back to the previous screen.
+ void SelectItem(Item* item, bool go_back);
private:
// Unselects the currently selected item. This is private so that the list can
@@ -124,6 +126,7 @@ class PaymentRequestItemList {
std::vector<std::unique_ptr<Item>> items_;
Item* selected_item_;
+ PaymentRequestDialogView* dialog_;
DISALLOW_COPY_AND_ASSIGN(PaymentRequestItemList);
};

Powered by Google App Engine
This is Rietveld 408576698