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

Side by Side Diff: chrome/browser/ui/views/payments/payment_method_view_controller.cc

Issue 2668063003: [Web Payments] Add Cancel button to all sheets (Closed)
Patch Set: Rebase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/payments/payment_method_view_controller.h" 5 #include "chrome/browser/ui/views/payments/payment_method_view_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 19 matching lines...) Expand all
30 // TODO(anthonyvd): populate this view. 30 // TODO(anthonyvd): populate this view.
31 31
32 return CreatePaymentView(CreateSheetHeaderView( 32 return CreatePaymentView(CreateSheetHeaderView(
33 true, 33 true,
34 l10n_util::GetStringUTF16( 34 l10n_util::GetStringUTF16(
35 IDS_PAYMENT_REQUEST_PAYMENT_METHOD_SECTION_NAME), 35 IDS_PAYMENT_REQUEST_PAYMENT_METHOD_SECTION_NAME),
36 this), 36 this),
37 std::move(content_view)); 37 std::move(content_view));
38 } 38 }
39 39
40 void PaymentMethodViewController::ButtonPressed(
41 views::Button* sender, const ui::Event& event) {
42 switch (sender->tag()) {
43 case static_cast<int>(PaymentRequestCommonTags::CLOSE_BUTTON_TAG):
44 dialog()->CloseDialog();
45 break;
46 case static_cast<int>(PaymentRequestCommonTags::BACK_BUTTON_TAG):
47 dialog()->GoBack();
48 break;
49 default:
50 NOTREACHED();
51 }
52 }
53
54 } // namespace payments 40 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698