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

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

Issue 2735803003: [WebPayments] Extracting common code from Shipping + Contact Info views. (Closed)
Patch Set: anthonyvd feedback 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 547194ee4901930b0f165cbbd35fdb0fd82d043b..6816c87f8ff5ac1367cf6407995fe769fc917c25 100644
--- a/chrome/browser/ui/views/payments/payment_request_item_list.h
+++ b/chrome/browser/ui/views/payments/payment_request_item_list.h
@@ -9,6 +9,7 @@
#include <vector>
#include "base/macros.h"
+#include "ui/views/controls/button/button.h"
namespace views {
class ImageView;
@@ -27,12 +28,12 @@ class PaymentRequest;
class PaymentRequestItemList {
public:
// Represents an item in the item list.
- class Item {
+ class Item : public views::ButtonListener {
public:
// Creates an item that will be owned by |list| with the initial state set
// to |selected|.
Item(PaymentRequest* request, PaymentRequestItemList* list, bool selected);
- virtual ~Item();
+ ~Item() override;
// Gets the view associated with this item. It's owned by this object so
// that it can listen to any changes to the underlying model and update the
@@ -66,6 +67,10 @@ class PaymentRequestItemList {
std::unique_ptr<views::ImageView> CreateCheckmark(bool selected);
private:
+ // views::ButtonListener:
+ void ButtonPressed(views::Button* sender, const ui::Event& event) override {
please use gerrit instead 2017/03/10 20:23:12 Shouldn't this be protected, so that deriving clas
tmartino 2017/03/10 23:46:23 Per anthonyvd's comment, we're going to first try
+ }
+
std::unique_ptr<views::View> item_view_;
PaymentRequest* request_;
PaymentRequestItemList* list_;

Powered by Google App Engine
This is Rietveld 408576698