// Copyright 2014 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file contains implementation details, the public interface is declared // in time_format.h. #ifndef UI_BASE_L10N_FORMATTER_H_ #define UI_BASE_L10N_FORMATTER_H_ #include <memory> #include "base/component_export.h" #include "base/lazy_instance.h" #include "third_party/icu/source/common/unicode/unistr.h" #include "third_party/icu/source/i18n/unicode/msgfmt.h" #include "third_party/icu/source/i18n/unicode/plurrule.h" #include "ui/base/l10n/time_format.h" namespace ui { struct Pluralities; // Formatter for a (format, length) combination. May either be instantiated // with six parameters for use in TimeFormat::Simple() or with twelve parameters // for use in TimeFormat::Detailed(). class Formatter { … }; // Class to hold all Formatters, intended to be used in a global LazyInstance. class COMPONENT_EXPORT(UI_BASE) FormatterContainer { … }; // Windows compilation requires full definition of FormatterContainer before // LazyInstance<FormatterContainter> may be declared. extern COMPONENT_EXPORT(UI_BASE) base::LazyInstance<FormatterContainer>::Leaky g_container; // For use in unit tests only. extern COMPONENT_EXPORT(UI_BASE) bool formatter_force_fallback; } // namespace ui #endif // UI_BASE_L10N_FORMATTER_H_