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

Unified Diff: chrome/browser/ui/views/payments/editor_view_controller.cc

Issue 2725943002: [Payments] Add product branding to Payment Request dialog. (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/payments/editor_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/editor_view_controller.cc b/chrome/browser/ui/views/payments/editor_view_controller.cc
index 9df050ef9ce9b2f9164608213bef4a3324fe7837..ac5f7a63b15139feefb151de79efa5b12712fcfe 100644
--- a/chrome/browser/ui/views/payments/editor_view_controller.cc
+++ b/chrome/browser/ui/views/payments/editor_view_controller.cc
@@ -77,6 +77,25 @@ std::unique_ptr<views::View> EditorViewController::CreateView() {
std::move(content_view));
}
+void EditorViewController::DisplayErrorMessageForField(
+ const EditorField& field,
+ const base::string16& error_message) {
+ const auto& label_it = error_labels_.find(field);
+ DCHECK(label_it != error_labels_.end());
+ label_it->second->SetText(error_message);
+ label_it->second->SchedulePaint();
+ dialog()->Layout();
+}
+
+std::unique_ptr<views::Button> EditorViewController::CreatePrimaryButton() {
+ std::unique_ptr<views::Button> button(
+ views::MdTextButton::CreateSecondaryUiBlueButton(
+ this, l10n_util::GetStringUTF16(IDS_DONE)));
+ button->set_tag(static_cast<int>(EditorViewControllerTags::SAVE_BUTTON));
+ button->set_id(static_cast<int>(DialogViewID::EDITOR_SAVE_BUTTON));
+ return button;
+}
+
// Adds the "required fields" label in disabled text, to obtain this result.
// +---------------------------------------------------------+
// | "* indicates required fields" | CANCEL | DONE |
@@ -101,25 +120,6 @@ std::unique_ptr<views::View> EditorViewController::CreateExtraFooterView() {
return content_view;
}
-void EditorViewController::DisplayErrorMessageForField(
- const EditorField& field,
- const base::string16& error_message) {
- const auto& label_it = error_labels_.find(field);
- DCHECK(label_it != error_labels_.end());
- label_it->second->SetText(error_message);
- label_it->second->SchedulePaint();
- dialog()->Layout();
-}
-
-std::unique_ptr<views::Button> EditorViewController::CreatePrimaryButton() {
- std::unique_ptr<views::Button> button(
- views::MdTextButton::CreateSecondaryUiBlueButton(
- this, l10n_util::GetStringUTF16(IDS_DONE)));
- button->set_tag(static_cast<int>(EditorViewControllerTags::SAVE_BUTTON));
- button->set_id(static_cast<int>(DialogViewID::EDITOR_SAVE_BUTTON));
- return button;
-}
-
void EditorViewController::ButtonPressed(views::Button* sender,
const ui::Event& event) {
switch (sender->tag()) {

Powered by Google App Engine
This is Rietveld 408576698