• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef MOJO_PUBLIC_CPP_BASE_TEXT_DIRECTION_MOJOM_TRAITS_H_
6 #define MOJO_PUBLIC_CPP_BASE_TEXT_DIRECTION_MOJOM_TRAITS_H_
7 
8 #include "base/component_export.h"
9 #include "base/i18n/rtl.h"
10 #include "mojo/public/mojom/base/text_direction.mojom-shared.h"
11 
12 namespace mojo {
13 
14 template <>
COMPONENT_EXPORT(MOJO_BASE_MOJOM)15 struct COMPONENT_EXPORT(MOJO_BASE_MOJOM)
16     EnumTraits<mojo_base::mojom::TextDirection, base::i18n::TextDirection> {
17   static mojo_base::mojom::TextDirection ToMojom(
18       base::i18n::TextDirection text_direction);
19   static bool FromMojom(mojo_base::mojom::TextDirection input,
20                         base::i18n::TextDirection* out);
21 };
22 
23 }  // namespace mojo
24 
25 #endif  // MOJO_PUBLIC_CPP_BASE_TEXT_DIRECTION_MOJOM_TRAITS_H_
26