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

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

Issue 2649683002: [Payments] Improve the closing of the PR dialog. (Closed)
Patch Set: addressed comments from sky 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/order_summary_view_controller.h" 5 #include "chrome/browser/ui/views/payments/order_summary_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"
11 #include "base/memory/ptr_util.h" 11 #include "base/memory/ptr_util.h"
12 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/ui/views/payments/payment_request_dialog.h" 14 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h"
15 #include "chrome/browser/ui/views/payments/payment_request_views_util.h" 15 #include "chrome/browser/ui/views/payments/payment_request_views_util.h"
16 #include "chrome/grit/generated_resources.h" 16 #include "chrome/grit/generated_resources.h"
17 #include "components/payments/currency_formatter.h" 17 #include "components/payments/currency_formatter.h"
18 #include "components/payments/payment_request.h" 18 #include "components/payments/payment_request.h"
19 #include "components/strings/grit/components_strings.h" 19 #include "components/strings/grit/components_strings.h"
20 #include "ui/base/l10n/l10n_util.h" 20 #include "ui/base/l10n/l10n_util.h"
21 #include "ui/gfx/font.h" 21 #include "ui/gfx/font.h"
22 #include "ui/views/border.h" 22 #include "ui/views/border.h"
23 #include "ui/views/controls/label.h" 23 #include "ui/views/controls/label.h"
24 #include "ui/views/controls/styled_label.h" 24 #include "ui/views/controls/styled_label.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 amount_label->SizeToFit(0); 67 amount_label->SizeToFit(0);
68 layout->AddView(amount_label.release()); 68 layout->AddView(amount_label.release());
69 69
70 return row; 70 return row;
71 } 71 }
72 72
73 } // namespace 73 } // namespace
74 74
75 OrderSummaryViewController::OrderSummaryViewController( 75 OrderSummaryViewController::OrderSummaryViewController(
76 PaymentRequest* request, 76 PaymentRequest* request,
77 PaymentRequestDialog* dialog) 77 PaymentRequestDialogView* dialog)
78 : PaymentRequestSheetController(request, dialog) {} 78 : PaymentRequestSheetController(request, dialog) {}
79 79
80 OrderSummaryViewController::~OrderSummaryViewController() {} 80 OrderSummaryViewController::~OrderSummaryViewController() {}
81 81
82 std::unique_ptr<views::View> OrderSummaryViewController::CreateView() { 82 std::unique_ptr<views::View> OrderSummaryViewController::CreateView() {
83 std::unique_ptr<views::View> content_view = base::MakeUnique<views::View>(); 83 std::unique_ptr<views::View> content_view = base::MakeUnique<views::View>();
84 84
85 views::BoxLayout* layout = new views::BoxLayout( 85 views::BoxLayout* layout = new views::BoxLayout(
86 views::BoxLayout::kVertical, 0, 0, 0); 86 views::BoxLayout::kVertical, 0, 0, 0);
87 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START); 87 layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 break; 127 break;
128 case static_cast<int>(PaymentRequestCommonTags::BACK_BUTTON_TAG): 128 case static_cast<int>(PaymentRequestCommonTags::BACK_BUTTON_TAG):
129 dialog()->GoBack(); 129 dialog()->GoBack();
130 break; 130 break;
131 default: 131 default:
132 NOTREACHED(); 132 NOTREACHED();
133 } 133 }
134 } 134 }
135 135
136 } // namespace payments 136 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698