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

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

Issue 2768093006: [Payments] Desktop: Error message in the dialog. (Closed)
Patch Set: Test 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_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 17b4c6aed1eaededd41b0a3b147ffe97bf0a4c9e..343d3f2b60c48065c9f514109b4bda43b2f3e6e7 100644
--- a/chrome/browser/ui/views/payments/payment_request_views_util.cc
+++ b/chrome/browser/ui/views/payments/payment_request_views_util.cc
@@ -10,6 +10,8 @@
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h"
+#include "chrome/grit/chromium_strings.h"
+#include "chrome/grit/theme_resources.h"
#include "components/autofill/core/browser/autofill_data_util.h"
#include "components/autofill/core/browser/autofill_profile.h"
#include "components/autofill/core/browser/autofill_type.h"
@@ -187,6 +189,29 @@ std::unique_ptr<views::ImageView> CreateInstrumentIconView(
return card_icon_view;
}
+std::unique_ptr<views::View> CreateProductLogoFooterView() {
+ std::unique_ptr<views::View> content_view = base::MakeUnique<views::View>();
+
+ views::BoxLayout* layout =
+ new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0);
+ layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START);
+ layout->set_cross_axis_alignment(
+ views::BoxLayout::CROSS_AXIS_ALIGNMENT_START);
+ content_view->SetLayoutManager(layout);
+
+ // Adds the Chrome logo image.
+ std::unique_ptr<views::ImageView> chrome_logo =
+ base::MakeUnique<views::ImageView>();
+ chrome_logo->set_can_process_events_within_subtree(false);
+ chrome_logo->SetImage(ResourceBundle::GetSharedInstance()
+ .GetImageNamed(IDR_PRODUCT_LOGO_NAME_22)
+ .AsImageSkia());
+ chrome_logo->SetTooltipText(l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
+ content_view->AddChildView(chrome_logo.release());
+
+ return content_view;
+}
+
std::unique_ptr<views::View> GetShippingAddressLabel(
AddressStyleType type,
const std::string& locale,

Powered by Google App Engine
This is Rietveld 408576698