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

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

Issue 2529733002: [WebPayments] Move views-specific code to c/b/ui/views/ (Closed)
Patch Set: Implement ShowWebPaymentsDialog in TestBrowserWindow Created 4 years, 1 month 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_dialog.cc
diff --git a/chrome/browser/payments/ui/payment_request_dialog.cc b/chrome/browser/ui/views/payments/payment_request_dialog.cc
similarity index 78%
rename from chrome/browser/payments/ui/payment_request_dialog.cc
rename to chrome/browser/ui/views/payments/payment_request_dialog.cc
index 4c4c48091afe26575416f24c5a6e8eb3e0adc429..84f2a0c47eb9dbdb82cf09a76aa9c221419c79bd 100644
--- a/chrome/browser/payments/ui/payment_request_dialog.cc
+++ b/chrome/browser/ui/views/payments/payment_request_dialog.cc
@@ -3,15 +3,15 @@
// found in the LICENSE file.
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/payments/ui/payment_request_dialog.h"
+#include "chrome/browser/payments/payment_request_impl.h"
+#include "chrome/browser/ui/views/payments/payment_request_dialog.h"
#include "content/public/browser/browser_thread.h"
#include "ui/views/layout/fill_layout.h"
namespace payments {
-PaymentRequestDialog::PaymentRequestDialog(
- payments::mojom::PaymentRequestClientPtr client)
- : client_(std::move(client)),
+PaymentRequestDialog::PaymentRequestDialog(PaymentRequestImpl* impl)
+ : impl_(impl),
label_(new views::Label(base::ASCIIToUTF16("Payments dialog"))) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
SetLayoutManager(new views::FillLayout());
@@ -32,7 +32,7 @@ gfx::Size PaymentRequestDialog::GetPreferredSize() const {
bool PaymentRequestDialog::Cancel() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- client_->OnError(payments::mojom::PaymentErrorReason::USER_CANCEL);
+ impl_->Cancel();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698