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

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

Issue 2779283002: [Web Payments] Implement the CVC Unmask dialog. (Closed)
Patch Set: Fix components_unittests Created 3 years, 8 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_request_sheet_controller.h" 5 #include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h"
6 6
7 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h" 7 #include "chrome/browser/ui/views/payments/payment_request_dialog_view.h"
8 #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h" 8 #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h"
9 #include "chrome/browser/ui/views/payments/payment_request_views_util.h" 9 #include "chrome/browser/ui/views/payments/payment_request_views_util.h"
10 #include "components/payments/content/payment_request.h" 10 #include "components/payments/content/payment_request.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 layout->StartRow(1, 0); 104 layout->StartRow(1, 0);
105 // |content_view| will go into a views::ScrollView so it needs to be sized now 105 // |content_view| will go into a views::ScrollView so it needs to be sized now
106 // otherwise it'll be sized to the ScrollView's viewport height, preventing 106 // otherwise it'll be sized to the ScrollView's viewport height, preventing
107 // the scroll bar from ever being shown. 107 // the scroll bar from ever being shown.
108 views::View* pane = new views::View; 108 views::View* pane = new views::View;
109 views::GridLayout* pane_layout = new views::GridLayout(pane); 109 views::GridLayout* pane_layout = new views::GridLayout(pane);
110 views::ColumnSet* pane_columns = pane_layout->AddColumnSet(0); 110 views::ColumnSet* pane_columns = pane_layout->AddColumnSet(0);
111 pane_columns->AddColumn( 111 pane_columns->AddColumn(
112 views::GridLayout::Alignment::FILL, views::GridLayout::Alignment::LEADING, 112 views::GridLayout::Alignment::FILL, views::GridLayout::Alignment::LEADING,
113 0, views::GridLayout::SizeType::FIXED, kDialogWidth, kDialogWidth); 113 0, views::GridLayout::SizeType::FIXED, kDialogWidth, kDialogWidth);
114
Mathieu 2017/04/04 19:05:48 we could revert this line and thus file
anthonyvd 2017/04/04 23:02:14 Good catch, done.
114 pane->SetLayoutManager(pane_layout); 115 pane->SetLayoutManager(pane_layout);
115 pane_layout->StartRow(0, 0); 116 pane_layout->StartRow(0, 0);
116 pane_layout->AddView(content_view_); 117 pane_layout->AddView(content_view_);
117 pane->SizeToPreferredSize(); 118 pane->SizeToPreferredSize();
118 119
119 std::unique_ptr<views::ScrollView> scroll = 120 std::unique_ptr<views::ScrollView> scroll =
120 base::MakeUnique<views::ScrollView>(); 121 base::MakeUnique<views::ScrollView>();
121 scroll->EnableViewPortLayer(); 122 scroll->EnableViewPortLayer();
122 scroll->set_hide_horizontal_scrollbar(true); 123 scroll->set_hide_horizontal_scrollbar(true);
123 scroll->SetContents(pane); 124 scroll->SetContents(pane);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 button->set_tag(static_cast<int>(PaymentRequestCommonTags::CLOSE_BUTTON_TAG)); 173 button->set_tag(static_cast<int>(PaymentRequestCommonTags::CLOSE_BUTTON_TAG));
173 button->set_id(static_cast<int>(DialogViewID::CANCEL_BUTTON)); 174 button->set_id(static_cast<int>(DialogViewID::CANCEL_BUTTON));
174 trailing_buttons_container->AddChildView(button); 175 trailing_buttons_container->AddChildView(button);
175 176
176 layout->AddView(trailing_buttons_container.release()); 177 layout->AddView(trailing_buttons_container.release());
177 178
178 return container; 179 return container;
179 } 180 }
180 181
181 } // namespace payments 182 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698