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

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

Issue 2529733002: [WebPayments] Move views-specific code to c/b/ui/views/ (Closed)
Patch Set: Rebase Created 4 years 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 | « chrome/browser/payments/ui/payment_request_dialog.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/payments/ui/payment_request_dialog.cc
diff --git a/chrome/browser/payments/ui/payment_request_dialog.cc b/chrome/browser/payments/ui/payment_request_dialog.cc
deleted file mode 100644
index 4c4c48091afe26575416f24c5a6e8eb3e0adc429..0000000000000000000000000000000000000000
--- a/chrome/browser/payments/ui/payment_request_dialog.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/payments/ui/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)),
- label_(new views::Label(base::ASCIIToUTF16("Payments dialog"))) {
- DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- SetLayoutManager(new views::FillLayout());
- AddChildView(label_.get());
-}
-
-PaymentRequestDialog::~PaymentRequestDialog() {}
-
-ui::ModalType PaymentRequestDialog::GetModalType() const {
- return ui::MODAL_TYPE_CHILD;
-}
-
-gfx::Size PaymentRequestDialog::GetPreferredSize() const {
- gfx::Size ps = label_->GetPreferredSize();
- ps.Enlarge(200, 200);
- return ps;
-}
-
-bool PaymentRequestDialog::Cancel() {
- DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- client_->OnError(payments::mojom::PaymentErrorReason::USER_CANCEL);
- return true;
-}
-
-} // namespace payments
« no previous file with comments | « chrome/browser/payments/ui/payment_request_dialog.h ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698