chromium/ui/base/models/dialog_model_field.cc

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

#include "ui/base/models/dialog_model_field.h"

#include <string>
#include <utility>

#include "base/functional/bind.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/dialog_model.h"

namespace ui {

DialogModelLabel::TextReplacement::TextReplacement(std::u16string text,
                                                   bool is_emphasized)
    :{}
DialogModelLabel::TextReplacement::TextReplacement(
    int message_id,
    Callback callback,
    std::u16string accessible_name)
    :{}
DialogModelLabel::TextReplacement::TextReplacement(const TextReplacement&) =
    default;
DialogModelLabel::TextReplacement::~TextReplacement() = default;

DialogModelLabel::DialogModelLabel(int message_id)
    :{}

DialogModelLabel::DialogModelLabel(int message_id,
                                   std::vector<TextReplacement> replacements)
    :{}

DialogModelLabel::DialogModelLabel(std::u16string fixed_string)
    :{}

const std::u16string& DialogModelLabel::GetString() const {}

DialogModelLabel::DialogModelLabel(const DialogModelLabel&) = default;

DialogModelLabel::~DialogModelLabel() = default;

DialogModelLabel DialogModelLabel::CreateWithReplacement(
    int message_id,
    TextReplacement replacement) {}

DialogModelLabel DialogModelLabel::CreateWithReplacements(
    int message_id,
    std::vector<TextReplacement> replacements) {}

DialogModelLabel::TextReplacement DialogModelLabel::CreateLink(
    int message_id,
    base::RepeatingClosure closure,
    std::u16string accessible_name) {}

DialogModelLabel::TextReplacement DialogModelLabel::CreateLink(
    int message_id,
    Callback callback,
    std::u16string accessible_name) {}

DialogModelLabel::TextReplacement DialogModelLabel::CreatePlainText(
    std::u16string text) {}

DialogModelLabel::TextReplacement DialogModelLabel::CreateEmphasizedText(
    std::u16string text) {}

DialogModelField::DialogModelField(Type type,
                                   ElementIdentifier id,
                                   base::flat_set<Accelerator> accelerators,
                                   const DialogModelField::Params& params)
    :{}

DialogModelField::~DialogModelField() = default;

base::CallbackListSubscription DialogModelField::AddOnFieldChangedCallback(
    base::RepeatingClosure on_field_changed) {}

void DialogModelField::SetVisible(bool visible) {}

DialogModelParagraph* DialogModelField::AsParagraph() {}

DialogModelCheckbox* DialogModelField::AsCheckbox() {}

DialogModelCombobox* DialogModelField::AsCombobox() {}

DialogModelMenuItem* DialogModelField::AsMenuItem() {}

const DialogModelMenuItem* DialogModelField::AsMenuItem() const {}

const DialogModelTitleItem* DialogModelField::AsTitleItem() const {}

DialogModelTextfield* DialogModelField::AsTextfield() {}

DialogModelCustomField* DialogModelField::AsCustomField() {}

DialogModelParagraph::DialogModelParagraph(const DialogModelLabel& label,
                                           std::u16string header,
                                           ElementIdentifier id)
    :{}

DialogModelParagraph::~DialogModelParagraph() = default;

DialogModelCheckbox::DialogModelCheckbox(
    ElementIdentifier id,
    const DialogModelLabel& label,
    const DialogModelCheckbox::Params& params)
    :{}

DialogModelCheckbox::~DialogModelCheckbox() = default;

void DialogModelCheckbox::OnChecked(base::PassKey<DialogModelFieldHost>,
                                    bool is_checked) {}

DialogModelCombobox::Params::Params() = default;
DialogModelCombobox::Params::~Params() = default;

DialogModelCombobox::Params& DialogModelCombobox::Params::SetCallback(
    base::RepeatingClosure callback) {}

DialogModelCombobox::Params& DialogModelCombobox::Params::AddAccelerator(
    Accelerator accelerator) {}

DialogModelCombobox::DialogModelCombobox(
    ElementIdentifier id,
    std::u16string label,
    std::unique_ptr<ui::ComboboxModel> combobox_model,
    const DialogModelCombobox::Params& params)
    :{}

DialogModelCombobox::~DialogModelCombobox() = default;

void DialogModelCombobox::OnSelectedIndexChanged(
    base::PassKey<DialogModelFieldHost>,
    size_t selected_index) {}

void DialogModelCombobox::OnPerformAction(base::PassKey<DialogModelFieldHost>) {}

DialogModelMenuItem::Params::Params() = default;
DialogModelMenuItem::Params::~Params() = default;

DialogModelMenuItem::Params& DialogModelMenuItem::Params::SetIsEnabled(
    bool is_enabled) {}

DialogModelMenuItem::Params& DialogModelMenuItem::Params::SetId(
    ElementIdentifier id) {}

DialogModelMenuItem::DialogModelMenuItem(
    ImageModel icon,
    std::u16string label,
    base::RepeatingCallback<void(int)> callback,
    const DialogModelMenuItem::Params& params)
    :{}

DialogModelMenuItem::~DialogModelMenuItem() = default;

void DialogModelMenuItem::OnActivated(base::PassKey<DialogModelFieldHost>,
                                      int event_flags) {}

DialogModelSeparator::DialogModelSeparator()
    :{}

DialogModelSeparator::~DialogModelSeparator() = default;

DialogModelTitleItem::DialogModelTitleItem(std::u16string label,
                                           ElementIdentifier id)
    :{}

DialogModelTitleItem::~DialogModelTitleItem() = default;

DialogModelTextfield::Params::Params() = default;
DialogModelTextfield::Params::~Params() = default;

DialogModelTextfield::Params& DialogModelTextfield::Params::AddAccelerator(
    Accelerator accelerator) {}

DialogModelTextfield::DialogModelTextfield(
    ElementIdentifier id,
    std::u16string label,
    std::u16string text,
    const ui::DialogModelTextfield::Params& params)
    :{}

DialogModelTextfield::~DialogModelTextfield() = default;

void DialogModelTextfield::OnTextChanged(base::PassKey<DialogModelFieldHost>,
                                         std::u16string text) {}

DialogModelCustomField::Field::~Field() = default;

DialogModelCustomField::DialogModelCustomField(
    ElementIdentifier id,
    std::unique_ptr<DialogModelCustomField::Field> field)
    :{}

DialogModelCustomField::~DialogModelCustomField() = default;

DialogModelSection::DialogModelSection()
    :{}

DialogModelSection::~DialogModelSection() = default;

DialogModelSection::Builder::Builder()
    :{}

DialogModelSection::Builder::~Builder() {}

std::unique_ptr<DialogModelSection> DialogModelSection::Builder::Build() {}

base::CallbackListSubscription DialogModelSection::AddOnFieldAddedCallback(
    base::RepeatingCallback<void(DialogModelField*)> on_field_added) {}

base::CallbackListSubscription DialogModelSection::AddOnFieldChangedCallback(
    base::RepeatingCallback<void(DialogModelField*)> on_field_changed) {}

DialogModelField* DialogModelSection::GetFieldByUniqueId(ElementIdentifier id) {}

DialogModelCheckbox* DialogModelSection::GetCheckboxByUniqueId(
    ElementIdentifier id) {}

DialogModelCombobox* DialogModelSection::GetComboboxByUniqueId(
    ElementIdentifier id) {}

DialogModelTextfield* DialogModelSection::GetTextfieldByUniqueId(
    ElementIdentifier id) {}

void DialogModelSection::AddParagraph(const DialogModelLabel& label,
                                      std::u16string header,
                                      ElementIdentifier id) {}

void DialogModelSection::AddCheckbox(
    ElementIdentifier id,
    const DialogModelLabel& label,
    const DialogModelCheckbox::Params& params) {}

void DialogModelSection::AddCombobox(
    ElementIdentifier id,
    std::u16string label,
    std::unique_ptr<ui::ComboboxModel> combobox_model,
    const DialogModelCombobox::Params& params) {}

void DialogModelSection::AddSeparator() {}

void DialogModelSection::AddMenuItem(
    ImageModel icon,
    std::u16string label,
    base::RepeatingCallback<void(int)> callback,
    const DialogModelMenuItem::Params& params) {}

void DialogModelSection::AddTitleItem(std::u16string label,
                                      ElementIdentifier id) {}

void DialogModelSection::AddTextfield(
    ElementIdentifier id,
    std::u16string label,
    std::u16string text,
    const DialogModelTextfield::Params& params) {}

void DialogModelSection::AddCustomField(
    std::unique_ptr<DialogModelCustomField::Field> field,
    ElementIdentifier id) {}

void DialogModelSection::AddField(std::unique_ptr<DialogModelField> field) {}

void DialogModelSection::OnFieldChanged(DialogModelField* field) {}

}  // namespace ui