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

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

Issue 2689363004: [Payments] Add combobox support to editors. (Closed)
Patch Set: re-enable test, addressed comments 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_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_views_util.h" 8 #include "chrome/browser/ui/views/payments/payment_request_views_util.h"
9 #include "components/strings/grit/components_strings.h" 9 #include "components/strings/grit/components_strings.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/views/background.h" 11 #include "ui/views/background.h"
12 #include "ui/views/controls/button/md_text_button.h" 12 #include "ui/views/controls/button/md_text_button.h"
13 #include "ui/views/layout/box_layout.h" 13 #include "ui/views/layout/box_layout.h"
14 #include "ui/views/layout/grid_layout.h" 14 #include "ui/views/layout/grid_layout.h"
15 15
16 16
17 namespace payments { 17 namespace payments {
18 18
19 PaymentRequestSheetController::PaymentRequestSheetController( 19 PaymentRequestSheetController::PaymentRequestSheetController(
20 PaymentRequest* request, PaymentRequestDialogView* dialog) 20 PaymentRequest* request, PaymentRequestDialogView* dialog)
21 : request_(request), dialog_(dialog) { 21 : request_(request), dialog_(dialog) {
22 DCHECK(request_);
23 DCHECK(dialog_);
24 } 22 }
25 23
26 std::unique_ptr<views::Button> 24 std::unique_ptr<views::Button>
27 PaymentRequestSheetController::CreatePrimaryButton() { 25 PaymentRequestSheetController::CreatePrimaryButton() {
28 return nullptr; 26 return nullptr;
29 } 27 }
30 28
31 void PaymentRequestSheetController::ButtonPressed( 29 void PaymentRequestSheetController::ButtonPressed(
32 views::Button* sender, const ui::Event& event) { 30 views::Button* sender, const ui::Event& event) {
33 switch (static_cast<PaymentRequestCommonTags>(sender->tag())) { 31 switch (static_cast<PaymentRequestCommonTags>(sender->tag())) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 this, l10n_util::GetStringUTF16(IDS_CANCEL)); 116 this, l10n_util::GetStringUTF16(IDS_CANCEL));
119 button->set_tag(static_cast<int>(PaymentRequestCommonTags::CLOSE_BUTTON_TAG)); 117 button->set_tag(static_cast<int>(PaymentRequestCommonTags::CLOSE_BUTTON_TAG));
120 trailing_buttons_container->AddChildView(button); 118 trailing_buttons_container->AddChildView(button);
121 119
122 layout->AddView(trailing_buttons_container.release()); 120 layout->AddView(trailing_buttons_container.release());
123 121
124 return container; 122 return container;
125 } 123 }
126 124
127 } // namespace payments 125 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698