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

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

Issue 2720223004: Use PaymentRequestItemList for Shipping screen (Closed)
Patch Set: tryna fix tests Created 3 years, 10 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_views_util.cc
diff --git a/chrome/browser/ui/views/payments/payment_request_views_util.cc b/chrome/browser/ui/views/payments/payment_request_views_util.cc
index 46505589095ad8802f1ddb509c8430a4b11a671b..e2b58645c51614299bdaf12d82e8774be66aa794 100644
--- a/chrome/browser/ui/views/payments/payment_request_views_util.cc
+++ b/chrome/browser/ui/views/payments/payment_request_views_util.cc
@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h"
#include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h"
#include "components/autofill/core/browser/autofill_data_util.h"
#include "components/autofill/core/browser/autofill_profile.h"
@@ -31,6 +32,7 @@
#include "ui/views/controls/styled_label.h"
#include "ui/views/layout/grid_layout.h"
#include "ui/views/painter.h"
+#include "ui/views/vector_icons.h"
#include "ui/views/view.h"
namespace {
@@ -215,12 +217,20 @@ std::unique_ptr<views::View> GetContactInfoLabel(
base::JoinString(values, base::ASCIIToUTF16("\n")), nullptr);
}
-// Creates a views::Border object that can paint the gray horizontal ruler used
-// as a separator between items in the Payment Request dialog.
std::unique_ptr<views::Border> CreatePaymentRequestRowBorder() {
return views::CreateBorderPainter(
base::MakeUnique<PaymentRequestRowBorderPainter>(),
gfx::Insets());
}
+std::unique_ptr<views::ImageView> CreateCheckmark(bool selected) {
anthonyvd 2017/03/01 15:37:00 While you're moving this around: can you move it t
tmartino 2017/03/01 20:00:30 Done
+ std::unique_ptr<views::ImageView> checkmark =
+ base::MakeUnique<views::ImageView>();
+ checkmark->set_id(static_cast<int>(DialogViewID::CHECKMARK_VIEW));
+ checkmark->set_can_process_events_within_subtree(false);
+ checkmark->SetImage(gfx::CreateVectorIcon(views::kMenuCheckIcon, 0xFF609265));
anthonyvd 2017/03/01 15:37:00 Can we move the 0xFF609265 color to a constant? (M
tmartino 2017/03/01 20:00:30 Done
+ checkmark->SetVisible(selected);
+ return checkmark;
+}
+
} // namespace payments

Powered by Google App Engine
This is Rietveld 408576698