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

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

Issue 2625183002: [WebPayments] Adding Shipping Address and Contact Info display to order summary (Closed)
Patch Set: sky comments Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_views_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/payment_request_views_util.h
diff --git a/chrome/browser/ui/views/payments/payment_request_views_util.h b/chrome/browser/ui/views/payments/payment_request_views_util.h
index d72f6eadbc59ab10c074b4adeed19e3b13f1f9a9..91762417355dafc000a0fd10615b8321c86d2659 100644
--- a/chrome/browser/ui/views/payments/payment_request_views_util.h
+++ b/chrome/browser/ui/views/payments/payment_request_views_util.h
@@ -6,9 +6,14 @@
#define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_
#include <memory>
+#include <string>
#include "base/strings/string16.h"
+namespace autofill {
+class AutofillProfile;
+}
+
namespace views {
class VectorIconButtonDelegate;
class View;
@@ -54,6 +59,28 @@ std::unique_ptr<views::View> CreatePaymentView(
std::unique_ptr<views::View> header_view,
std::unique_ptr<views::View> content_view);
+// Represents formatting options for each of the different contexts in which an
+// Address label may be displayed.
+enum class AddressStyleType { SUMMARY, DETAILED };
+
+// Extracts and formats descriptive text from the given |profile| to represent
+// the address in the context specified by |type|.
+std::unique_ptr<views::View> GetShippingAddressLabel(
+ AddressStyleType type,
+ const std::string& locale,
+ const autofill::AutofillProfile& profile);
+
+// Extracts and formats descriptive text from the given |profile| to represent
+// the contact info in the context specified by |type|. Includes/excludes name,
+// email, and phone fields according to the respective boolean fields.
+std::unique_ptr<views::View> GetContactInfoLabel(
+ AddressStyleType type,
+ const std::string& locale,
+ const autofill::AutofillProfile& profile,
+ bool show_payer_name,
+ bool show_payer_email,
+ bool show_payer_phone);
+
} // namespace payments
#endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_VIEWS_UTIL_H_
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_request_views_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698