blob: 9a1f0b1ce8af608e1cfae8c4d1bbcdd41c8c2ec9 [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef THIRD_PARTY_BLINK_PUBLIC_MOJOM_COMMIT_RESULT_COMMIT_RESULT_MOJOM_SHARED_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_COMMIT_RESULT_COMMIT_RESULT_MOJOM_SHARED_H_
#include <stdint.h>
#include <functional>
#include <ostream>
#include <type_traits>
#include <utility>
#include "base/compiler_specific.h"
#include "base/containers/flat_map.h"
#include "mojo/public/cpp/bindings/array_data_view.h"
#include "mojo/public/cpp/bindings/enum_traits.h"
#include "mojo/public/cpp/bindings/interface_data_view.h"
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/map_data_view.h"
#include "mojo/public/cpp/bindings/string_data_view.h"
#include "third_party/blink/public/mojom/commit_result/commit_result.mojom-shared-internal.h"
#include "mojo/public/cpp/bindings/lib/interface_serialization.h"
#include "mojo/public/cpp/bindings/native_enum.h"
#include "mojo/public/cpp/bindings/lib/native_struct_serialization.h"
#include "base/component_export.h"
#ifdef KYTHE_IS_RUNNING
#pragma kythe_inline_metadata "Metadata comment"
#endif
namespace blink {
namespace mojom {
} // namespace mojom
} // namespace blink
namespace mojo {
namespace internal {
} // namespace internal
} // namespace mojo
namespace blink {
namespace mojom {
// @generated_from: blink.mojom.CommitResult
enum class CommitResult : int32_t {
// @generated_from: blink.mojom.CommitResult.Ok
Ok,
// @generated_from: blink.mojom.CommitResult.Aborted
Aborted,
// @generated_from: blink.mojom.CommitResult.RestartCrossDocument
RestartCrossDocument,
kMinValue = 0,
kMaxValue = 2,
};
COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) std::ostream& operator<<(std::ostream& os, CommitResult value);
inline bool IsKnownEnumValue(CommitResult value) {
return internal::CommitResult_Data::IsKnownValue(
static_cast<int32_t>(value));
}
} // namespace mojom
} // namespace blink
namespace std {
template <>
struct hash<::blink::mojom::CommitResult>
: public mojo::internal::EnumHashImpl<::blink::mojom::CommitResult> {};
} // namespace std
namespace mojo {
template <>
struct EnumTraits<::blink::mojom::CommitResult, ::blink::mojom::CommitResult> {
static ::blink::mojom::CommitResult ToMojom(::blink::mojom::CommitResult input) { return input; }
static bool FromMojom(::blink::mojom::CommitResult input, ::blink::mojom::CommitResult* output) {
*output = input;
return true;
}
};
namespace internal {
template <typename MaybeConstUserType>
struct Serializer<::blink::mojom::CommitResult, MaybeConstUserType> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = EnumTraits<::blink::mojom::CommitResult, UserType>;
static void Serialize(UserType input, int32_t* output) {
*output = static_cast<int32_t>(Traits::ToMojom(input));
}
static bool Deserialize(int32_t input, UserType* output) {
return Traits::FromMojom(static_cast<::blink::mojom::CommitResult>(input), output);
}
};
} // namespace internal
} // namespace mojo
namespace blink {
namespace mojom {
} // namespace mojom
} // namespace blink
#endif // THIRD_PARTY_BLINK_PUBLIC_MOJOM_COMMIT_RESULT_COMMIT_RESULT_MOJOM_SHARED_H_
/* Metadata comment
eyJtZXRhIjogW3siZW5kIjogMTU3NCwgImJlZ2luIjogMTU2MiwgImVkZ2UiOiAiJS9reXRoZS9l
ZGdlL2dlbmVyYXRlcyIsICJ0eXBlIjogImFuY2hvcl9kZWZpbmVzIiwgInZuYW1lIjogeyJjb3Jw
dXMiOiAiY2hyb21pdW0uZ29vZ2xlc291cmNlLmNvbS9jaHJvbWl1bS9zcmMiLCAibGFuZ3VhZ2Ui
OiAibW9qb20iLCAic2lnbmF0dXJlIjogImJsaW5rLm1vam9tLkNvbW1pdFJlc3VsdCJ9fSwgeyJl
bmQiOiAxNjQyLCAiYmVnaW4iOiAxNjQwLCAiZWRnZSI6ICIlL2t5dGhlL2VkZ2UvZ2VuZXJhdGVz
IiwgInR5cGUiOiAiYW5jaG9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