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

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

Issue 2768093006: [Payments] Desktop: Error message in the dialog. (Closed)
Patch Set: Test 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 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 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // Creates and returns the primary action button for this sheet. It's 50 // Creates and returns the primary action button for this sheet. It's
51 // typically a blue button with the "Pay" or "Done" labels. Subclasses may 51 // typically a blue button with the "Pay" or "Done" labels. Subclasses may
52 // return an empty std::unique_ptr (nullptr) to indicate that no primary 52 // return an empty std::unique_ptr (nullptr) to indicate that no primary
53 // button should be displayed. The caller takes ownership of the button but 53 // button should be displayed. The caller takes ownership of the button but
54 // the view is guaranteed to be outlived by the controller so subclasses may 54 // the view is guaranteed to be outlived by the controller so subclasses may
55 // retain a raw pointer to the returned button (for example to control its 55 // retain a raw pointer to the returned button (for example to control its
56 // enabled state). 56 // enabled state).
57 virtual std::unique_ptr<views::Button> CreatePrimaryButton(); 57 virtual std::unique_ptr<views::Button> CreatePrimaryButton();
58 58
59 // Returns the text that should be on the secondary button, by default
60 // "Cancel".
61 virtual base::string16 GetSecondaryButtonLabel();
62
59 // Returns whether this sheet should display a back arrow in the header next 63 // Returns whether this sheet should display a back arrow in the header next
60 // to the title. 64 // to the title.
61 virtual bool ShouldShowHeaderBackArrow(); 65 virtual bool ShouldShowHeaderBackArrow();
62 66
63 // Returns the title to be displayed in this sheet's header. 67 // Returns the title to be displayed in this sheet's header.
64 virtual base::string16 GetSheetTitle() = 0; 68 virtual base::string16 GetSheetTitle() = 0;
65 69
66 // Implemented by subclasses to populate |content_view| with the views that 70 // Implemented by subclasses to populate |content_view| with the views that
67 // should be displayed in their content area (between the header and the 71 // should be displayed in their content area (between the header and the
68 // footer). This may be called at view creation time as well as anytime 72 // footer). This may be called at view creation time as well as anytime
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 117
114 // This view is owned by its encompassing ScrollView. 118 // This view is owned by its encompassing ScrollView.
115 views::View* content_view_; 119 views::View* content_view_;
116 120
117 DISALLOW_COPY_AND_ASSIGN(PaymentRequestSheetController); 121 DISALLOW_COPY_AND_ASSIGN(PaymentRequestSheetController);
118 }; 122 };
119 123
120 } // namespace payments 124 } // namespace payments
121 125
122 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_ 126 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_SHEET_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698