sharesheet_mojom_traits.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2022 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. #ifndef CHROMEOS_CROSAPI_MOJOM_SHARESHEET_MOJOM_TRAITS_H_
  5. #define CHROMEOS_CROSAPI_MOJOM_SHARESHEET_MOJOM_TRAITS_H_
  6. #include "chromeos/components/sharesheet/constants.h"
  7. #include "chromeos/crosapi/mojom/sharesheet.mojom.h"
  8. #include "mojo/public/cpp/bindings/enum_traits.h"
  9. namespace mojo {
  10. template <>
  11. struct EnumTraits<crosapi::mojom::SharesheetLaunchSource,
  12. sharesheet::LaunchSource> {
  13. static crosapi::mojom::SharesheetLaunchSource ToMojom(
  14. sharesheet::LaunchSource input);
  15. static bool FromMojom(crosapi::mojom::SharesheetLaunchSource input,
  16. sharesheet::LaunchSource* output);
  17. };
  18. template <>
  19. struct EnumTraits<crosapi::mojom::SharesheetResult,
  20. sharesheet::SharesheetResult> {
  21. static crosapi::mojom::SharesheetResult ToMojom(
  22. sharesheet::SharesheetResult input);
  23. static bool FromMojom(crosapi::mojom::SharesheetResult input,
  24. sharesheet::SharesheetResult* output);
  25. };
  26. } // namespace mojo
  27. #endif // CHROMEOS_CROSAPI_MOJOM_SHARESHEET_MOJOM_TRAITS_H_