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

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

Issue 2853373003: [Web Payments] Explicitly move SheetView (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 scroll_->EnableViewPortLayer(); 183 scroll_->EnableViewPortLayer();
184 scroll_->set_hide_horizontal_scrollbar(true); 184 scroll_->set_hide_horizontal_scrollbar(true);
185 scroll_->SetContents(pane_); 185 scroll_->SetContents(pane_);
186 layout->AddView(scroll_.get()); 186 layout->AddView(scroll_.get());
187 187
188 layout->StartRow(0, 0); 188 layout->StartRow(0, 0);
189 layout->AddView(CreateFooterView().release()); 189 layout->AddView(CreateFooterView().release());
190 190
191 view->SetFirstFocusableView(GetFirstFocusedView()); 191 view->SetFirstFocusableView(GetFirstFocusedView());
192 192
193 return view; 193 return std::move(view);
194 } 194 }
195 195
196 std::unique_ptr<views::View> PaymentRequestSheetController::CreateFooterView() { 196 std::unique_ptr<views::View> PaymentRequestSheetController::CreateFooterView() {
197 std::unique_ptr<views::View> container = base::MakeUnique<views::View>(); 197 std::unique_ptr<views::View> container = base::MakeUnique<views::View>();
198 198
199 views::GridLayout* layout = new views::GridLayout(container.get()); 199 views::GridLayout* layout = new views::GridLayout(container.get());
200 container->SetLayoutManager(layout); 200 container->SetLayoutManager(layout);
201 201
202 views::ColumnSet* columns = layout->AddColumnSet(0); 202 views::ColumnSet* columns = layout->AddColumnSet(0);
203 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER, 203 columns->AddColumn(views::GridLayout::LEADING, views::GridLayout::CENTER,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 views::View* PaymentRequestSheetController::GetFirstFocusedView() { 250 views::View* PaymentRequestSheetController::GetFirstFocusedView() {
251 if (primary_button_ && primary_button_->enabled()) 251 if (primary_button_ && primary_button_->enabled())
252 return primary_button_.get(); 252 return primary_button_.get();
253 253
254 DCHECK(secondary_button_); 254 DCHECK(secondary_button_);
255 255
256 return secondary_button_.get(); 256 return secondary_button_.get();
257 } 257 }
258 258
259 } // namespace payments 259 } // namespace payments
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698