chromium/chrome/browser/ui/views/payments/editor_view_controller.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ui/views/payments/editor_view_controller.h"

#include <algorithm>
#include <map>
#include <memory>
#include <utility>

#include "base/not_fatal_until.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/chrome_typography.h"
#include "chrome/browser/ui/views/payments/payment_request_dialog_view.h"
#include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h"
#include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h"
#include "chrome/browser/ui/views/payments/payment_request_views_util.h"
#include "chrome/browser/ui/views/payments/validating_combobox.h"
#include "chrome/browser/ui/views/payments/validating_textfield.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/ime/text_input_type.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/models/combobox_model.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/label_button.h"
#include "ui/views/controls/button/md_text_button.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/styled_label.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/box_layout_view.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/table_layout_view.h"
#include "ui/views/view.h"

namespace payments {
namespace {

constexpr int kErrorLabelTopPadding =;

std::unique_ptr<views::Label> CreateErrorLabel(const std::u16string& error,
                                               autofill::FieldType type) {}

}  // namespace

EditorViewController::EditorViewController(
    base::WeakPtr<PaymentRequestSpec> spec,
    base::WeakPtr<PaymentRequestState> state,
    base::WeakPtr<PaymentRequestDialogView> dialog,
    BackNavigationType back_navigation_type,
    bool is_incognito)
    :{}

EditorViewController::~EditorViewController() {}

void EditorViewController::DisplayErrorMessageForField(
    autofill::FieldType type,
    const std::u16string& error_message) {}

// static
int EditorViewController::GetInputFieldViewId(autofill::FieldType type) {}

std::unique_ptr<views::View> EditorViewController::CreateHeaderView() {}

std::unique_ptr<views::View> EditorViewController::CreateCustomFieldView(
    autofill::FieldType type,
    views::View** focusable_field,
    bool* valid,
    std::u16string* error_message) {}

std::unique_ptr<views::View> EditorViewController::CreateExtraViewForField(
    autofill::FieldType type) {}

bool EditorViewController::ValidateInputFields() {}

void EditorViewController::Stop() {}

std::u16string EditorViewController::GetPrimaryButtonLabel() {}

PaymentRequestSheetController::ButtonCallback
EditorViewController::GetPrimaryButtonCallback() {}

int EditorViewController::GetPrimaryButtonId() {}

bool EditorViewController::GetPrimaryButtonEnabled() {}

bool EditorViewController::ShouldShowSecondaryButton() {}

void EditorViewController::FillContentView(views::View* content_view) {}

bool EditorViewController::ShouldAccelerateEnterKey() {}

void EditorViewController::UpdateEditorView() {}

views::View* EditorViewController::GetFirstFocusedView() {}

std::unique_ptr<ValidatingCombobox>
EditorViewController::CreateComboboxForField(const EditorField& field,
                                             std::u16string* error_message) {}

void EditorViewController::ContentsChanged(views::Textfield* sender,
                                           const std::u16string& new_contents) {}

void EditorViewController::OnPerformAction(ValidatingCombobox* sender) {}

std::unique_ptr<views::View> EditorViewController::CreateEditorView() {}

// Each input field is a 4-quadrant grid.
// +----------------------------------------------------------+
// | Field Label           | Input field (textfield/combobox) |
// |_______________________|__________________________________|
// |   (empty)             | Error label                      |
// +----------------------------------------------------------+
views::View* EditorViewController::CreateInputField(views::View* editor_view,
                                                    const EditorField& field,
                                                    bool* valid) {}

int EditorViewController::ComputeWidestExtraViewWidth(
    EditorField::LengthHint size) {}

void EditorViewController::AddOrUpdateErrorMessageForField(
    autofill::FieldType type,
    const std::u16string& error_message) {}

void EditorViewController::SaveButtonPressed(const ui::Event& event) {}

void EditorViewController::ClearViewPointers() {}

}  // namespace payments