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

// Copyright 2016 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/order_summary_view_controller.h"

#include <memory>
#include <utility>
#include <vector>

#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.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_views_util.h"
#include "components/payments/core/currency_formatter.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/font.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/views/border.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/layout/box_layout.h"
#include "ui/views/layout/table_layout.h"
#include "ui/views/view.h"

namespace payments {

namespace {

// The vertical spacing for these rows is slightly different than the
// spacing spacing for clickable rows, so don't use
// kPaymentRequestRowVerticalInsets.
constexpr int kLineItemRowVerticalInset =;

class LineItemRow : public views::View {};

BEGIN_METADATA()

// Creates a view for a line item to be displayed in the Order Summary Sheet.
// |label| is the text in the left-aligned label and |amount| is the text of the
// right-aliged label in the row. The |amount| and |label| texts are emphasized
// if |emphasize| is true, which is only the case for the last row containing
// the total of the order. |amount_label_id| is specified to recall the view
// later, e.g. in tests.
std::unique_ptr<views::View> CreateLineItemView(const std::u16string& label,
                                                const std::u16string& currency,
                                                const std::u16string& amount,
                                                bool emphasize,
                                                DialogViewID currency_label_id,
                                                DialogViewID amount_label_id) {}

}  // namespace

OrderSummaryViewController::OrderSummaryViewController(
    base::WeakPtr<PaymentRequestSpec> spec,
    base::WeakPtr<PaymentRequestState> state,
    base::WeakPtr<PaymentRequestDialogView> dialog)
    :{}

OrderSummaryViewController::~OrderSummaryViewController() {}

void OrderSummaryViewController::OnSpecUpdated() {}

void OrderSummaryViewController::OnSelectedInformationChanged() {}

bool OrderSummaryViewController::ShouldShowSecondaryButton() {}

std::u16string OrderSummaryViewController::GetSheetTitle() {}

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

bool OrderSummaryViewController::GetSheetId(DialogViewID* sheet_id) {}

bool OrderSummaryViewController::ShouldAccelerateEnterKey() {}

base::WeakPtr<PaymentRequestSheetController>
OrderSummaryViewController::GetWeakPtr() {}

}  // namespace payments