// third_party/blink/public/mojom/manifest/manifest.mojom-blink.cc is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2013 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.

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif

#include "third_party/blink/public/mojom/manifest/manifest.mojom-blink.h"

#include <math.h>
#include <stdint.h>
#include <utility>

#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/common/task_annotator.h"
#include "base/trace_event/trace_conversion_helper.h"
#include "base/trace_event/traced_value.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_context.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"

#include "third_party/blink/public/mojom/manifest/manifest.mojom-params-data.h"
#include "third_party/blink/public/mojom/manifest/manifest.mojom-shared-message-ids.h"

#include "third_party/blink/public/mojom/manifest/manifest.mojom-blink-import-headers.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"


#ifndef THIRD_PARTY_BLINK_PUBLIC_MOJOM_MANIFEST_MANIFEST_MOJOM_BLINK_JUMBO_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_MANIFEST_MANIFEST_MOJOM_BLINK_JUMBO_H_
#endif
namespace blink {
namespace mojom {
namespace blink {
Manifest::Manifest()
    : name(),
      short_name(),
      start_url(),
      display(),
      display_override(),
      orientation(),
      icons(),
      shortcuts(),
      share_target(),
      file_handlers(),
      protocol_handlers(),
      related_applications(),
      prefer_related_applications(),
      has_theme_color(),
      theme_color(),
      has_background_color(),
      background_color(),
      gcm_sender_id(),
      scope() {}

Manifest::Manifest(
    const ::WTF::String& name_in,
    const ::WTF::String& short_name_in,
    const ::blink::KURL& start_url_in,
    ::blink::mojom::blink::DisplayMode display_in,
    WTF::Vector<::blink::mojom::blink::DisplayMode> display_override_in,
    ::device::mojom::blink::ScreenOrientationLockType orientation_in,
    WTF::Vector<ManifestImageResourcePtr> icons_in,
    WTF::Vector<ManifestShortcutItemPtr> shortcuts_in,
    ManifestShareTargetPtr share_target_in,
    WTF::Vector<ManifestFileHandlerPtr> file_handlers_in,
    WTF::Vector<ManifestProtocolHandlerPtr> protocol_handlers_in,
    WTF::Vector<ManifestRelatedApplicationPtr> related_applications_in,
    bool prefer_related_applications_in,
    bool has_theme_color_in,
    uint32_t theme_color_in,
    bool has_background_color_in,
    uint32_t background_color_in,
    const ::WTF::String& gcm_sender_id_in,
    const ::blink::KURL& scope_in)
    : name(std::move(name_in)),
      short_name(std::move(short_name_in)),
      start_url(std::move(start_url_in)),
      display(std::move(display_in)),
      display_override(std::move(display_override_in)),
      orientation(std::move(orientation_in)),
      icons(std::move(icons_in)),
      shortcuts(std::move(shortcuts_in)),
      share_target(std::move(share_target_in)),
      file_handlers(std::move(file_handlers_in)),
      protocol_handlers(std::move(protocol_handlers_in)),
      related_applications(std::move(related_applications_in)),
      prefer_related_applications(std::move(prefer_related_applications_in)),
      has_theme_color(std::move(has_theme_color_in)),
      theme_color(std::move(theme_color_in)),
      has_background_color(std::move(has_background_color_in)),
      background_color(std::move(background_color_in)),
      gcm_sender_id(std::move(gcm_sender_id_in)),
      scope(std::move(scope_in)) {}

Manifest::~Manifest() = default;

void Manifest::AsValueInto(base::trace_event::TracedValue* value) const {
  value->SetString("name", base::trace_event::ValueToString(this->name, "<value of type const ::WTF::String&>"));
  value->SetString("short_name", base::trace_event::ValueToString(this->short_name, "<value of type const ::WTF::String&>"));
  value->SetString("start_url", base::trace_event::ValueToString(this->start_url, "<value of type const ::blink::KURL&>"));
  value->SetString("display", base::trace_event::ValueToString(this->display));
  value->BeginArray("display_override");
  for (const auto& item0 : this->display_override) {
    value->AppendString(base::trace_event::ValueToString(item0));
  }
  value->EndArray();
  value->SetString("orientation", base::trace_event::ValueToString(this->orientation));
  value->BeginArray("icons");
  for (const auto& item0 : this->icons) {
    if (item0.is_null()) {
      value->AppendString("nullptr");
    } else {
      value->BeginDictionary();
      item0->AsValueInto(value);
      value->EndDictionary();
    }
  }
  value->EndArray();
  value->BeginArray("shortcuts");
  for (const auto& item0 : this->shortcuts) {
    if (item0.is_null()) {
      value->AppendString("nullptr");
    } else {
      value->BeginDictionary();
      item0->AsValueInto(value);
      value->EndDictionary();
    }
  }
  value->EndArray();
  if (this->share_target.is_null()) {
    value->SetString("share_target", "nullptr");
  } else {
    value->BeginDictionary("share_target");
    this->share_target->AsValueInto(value);
    value->EndDictionary();
  }
  value->BeginArray("file_handlers");
  for (const auto& item0 : this->file_handlers) {
    if (item0.is_null()) {
      value->AppendString("nullptr");
    } else {
      value->BeginDictionary();
      item0->AsValueInto(value);
      value->EndDictionary();
    }
  }
  value->EndArray();
  value->BeginArray("protocol_handlers");
  for (const auto& item0 : this->protocol_handlers) {
    if (item0.is_null()) {
      value->AppendString("nullptr");
    } else {
      value->BeginDictionary();
      item0->AsValueInto(value);
      value->EndDictionary();
    }
  }
  value->EndArray();
  value->BeginArray("related_applications");
  for (const auto& item0 : this->related_applications) {
    if (item0.is_null()) {
      value->AppendString("nullptr");
    } else {
      value->BeginDictionary();
      item0->AsValueInto(value);
      value->EndDictionary();
    }
  }
  value->EndArray();
  value->SetBoolean("prefer_related_applications", this->prefer_related_applications);
  value->SetBoolean("has_theme_color", this->has_theme_color);
  value->SetString("theme_color", base::NumberToString(this->theme_color));
  value->SetBoolean("has_background_color", this->has_background_color);
  value->SetString("background_color", base::NumberToString(this->background_color));
  value->SetString("gcm_sender_id", base::trace_event::ValueToString(this->gcm_sender_id, "<value of type const ::WTF::String&>"));
  value->SetString("scope", base::trace_event::ValueToString(this->scope, "<value of type const ::blink::KURL&>"));
}

bool Manifest::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ManifestShortcutItem::ManifestShortcutItem()
    : name(),
      short_name(),
      description(),
      url(),
      icons() {}

ManifestShortcutItem::ManifestShortcutItem(
    const ::WTF::String& name_in,
    const ::WTF::String& short_name_in,
    const ::WTF::String& description_in,
    const ::blink::KURL& url_in,
    WTF::Vector<ManifestImageResourcePtr> icons_in)
    : name(std::move(name_in)),
      short_name(std::move(short_name_in)),
      description(std::move(description_in)),
      url(std::move(url_in)),
      icons(std::move(icons_in)) {}

ManifestShortcutItem::~ManifestShortcutItem() = default;

void ManifestShortcutItem::AsValueInto(base::trace_event::TracedValue* value) const {
  value->SetString("name", base::trace_event::ValueToString(this->name, "<value of type const ::WTF::String&>"));
  value->SetString("short_name", base::trace_event::ValueToString(this->short_name, "<value of type const ::WTF::String&>"));
  value->SetString("description", base::trace_event::ValueToString(this->description, "<value of type const ::WTF::String&>"));
  value->SetString("url", base::trace_event::ValueToString(this->url, "<value of type const ::blink::KURL&>"));
  value->BeginArray("icons");
  for (const auto& item0 : this->icons) {
    if (item0.is_null()) {
      value->AppendString("nullptr");
    } else {
      value->BeginDictionary();
      item0->AsValueInto(value);
      value->EndDictionary();
    }
  }
  value->EndArray();
}

bool ManifestShortcutItem::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ManifestImageResource::ManifestImageResource()
    : src(),
      type(),
      sizes(),
      purpose() {}

ManifestImageResource::ManifestImageResource(
    const ::blink::KURL& src_in,
    const ::WTF::String& type_in,
    WTF::Vector<::gfx::Size> sizes_in,
    WTF::Vector<ManifestImageResource::Purpose> purpose_in)
    : src(std::move(src_in)),
      type(std::move(type_in)),
      sizes(std::move(sizes_in)),
      purpose(std::move(purpose_in)) {}

ManifestImageResource::~ManifestImageResource() = default;

void ManifestImageResource::AsValueInto(base::trace_event::TracedValue* value) const {
  value->SetString("src", base::trace_event::ValueToString(this->src, "<value of type const ::blink::KURL&>"));
  value->SetString("type", base::trace_event::ValueToString(this->type, "<value of type const ::WTF::String&>"));
  value->BeginArray("sizes");
  for (const auto& item0 : this->sizes) {
    value->AppendString(base::trace_event::ValueToString(item0, "<value of type const ::gfx::Size&>"));
  }
  value->EndArray();
  value->BeginArray("purpose");
  for (const auto& item0 : this->purpose) {
    value->AppendString(base::trace_event::ValueToString(item0));
  }
  value->EndArray();
}

bool ManifestImageResource::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ManifestFileFilter::ManifestFileFilter()
    : name(),
      accept() {}

ManifestFileFilter::ManifestFileFilter(
    const ::WTF::String& name_in,
    WTF::Vector<::WTF::String> accept_in)
    : name(std::move(name_in)),
      accept(std::move(accept_in)) {}

ManifestFileFilter::~ManifestFileFilter() = default;

void ManifestFileFilter::AsValueInto(base::trace_event::TracedValue* value) const {
  value->SetString("name", base::trace_event::ValueToString(this->name, "<value of type const ::WTF::String&>"));
  value->BeginArray("accept");
  for (const auto& item0 : this->accept) {
    value->AppendString(base::trace_event::ValueToString(item0, "<value of type const ::WTF::String&>"));
  }
  value->EndArray();
}

bool ManifestFileFilter::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ManifestProtocolHandler::ManifestProtocolHandler()
    : protocol(),
      url() {}

ManifestProtocolHandler::ManifestProtocolHandler(
    const ::WTF::String& protocol_in,
    const ::blink::KURL& url_in)
    : protocol(std::move(protocol_in)),
      url(std::move(url_in)) {}

ManifestProtocolHandler::~ManifestProtocolHandler() = default;

void ManifestProtocolHandler::AsValueInto(base::trace_event::TracedValue* value) const {
  value->SetString("protocol", base::trace_event::ValueToString(this->protocol, "<value of type const ::WTF::String&>"));
  value->SetString("url", base::trace_event::ValueToString(this->url, "<value of type const ::blink::KURL&>"));
}

bool ManifestProtocolHandler::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ManifestRelatedApplication::ManifestRelatedApplication()
    : platform(),
      url(),
      id() {}

ManifestRelatedApplication::ManifestRelatedApplication(
    const ::WTF::String& platform_in,
    const base::Optional<::blink::KURL>& url_in,
    const ::WTF::String& id_in)
    : platform(std::move(platform_in)),
      url(std::move(url_in)),
      id(std::move(id_in)) {}

ManifestRelatedApplication::~ManifestRelatedApplication() = default;

void ManifestRelatedApplication::AsValueInto(base::trace_event::TracedValue* value) const {
  value->SetString("platform", base::trace_event::ValueToString(this->platform, "<value of type const ::WTF::String&>"));
  value->SetString("url", base::trace_event::ValueToString(this->url, "<value of type const base::Optional<::blink::KURL>&>"));
  value->SetString("id", base::trace_event::ValueToString(this->id, "<value of type const ::WTF::String&>"));
}

bool ManifestRelatedApplication::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ManifestShareTargetParams::ManifestShareTargetParams()
    : title(),
      text(),
      url(),
      files() {}

ManifestShareTargetParams::ManifestShareTargetParams(
    const ::WTF::String& title_in,
    const ::WTF::String& text_in,
    const ::WTF::String& url_in,
    base::Optional<WTF::Vector<ManifestFileFilterPtr>> files_in)
    : title(std::move(title_in)),
      text(std::move(text_in)),
      url(std::move(url_in)),
      files(std::move(files_in)) {}

ManifestShareTargetParams::~ManifestShareTargetParams() = default;

void ManifestShareTargetParams::AsValueInto(base::trace_event::TracedValue* value) const {
  value->SetString("title", base::trace_event::ValueToString(this->title, "<value of type const ::WTF::String&>"));
  value->SetString("text", base::trace_event::ValueToString(this->text, "<value of type const ::WTF::String&>"));
  value->SetString("url", base::trace_event::ValueToString(this->url, "<value of type const ::WTF::String&>"));
  if (this->files.has_value()) {
    value->BeginArray("files");
    for (const auto& item0 : this->files.value()) {
      if (item0.is_null()) {
        value->AppendString("nullptr");
      } else {
        value->BeginDictionary();
        item0->AsValueInto(value);
        value->EndDictionary();
      }
    }
    value->EndArray();
  } else {
    value->SetString("files", "base::nullopt");
  }
}

bool ManifestShareTargetParams::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ManifestShareTarget::ManifestShareTarget()
    : action(),
      method(),
      enctype(),
      params() {}

ManifestShareTarget::ManifestShareTarget(
    const ::blink::KURL& action_in,
    ManifestShareTarget::Method method_in,
    ManifestShareTarget::Enctype enctype_in,
    ManifestShareTargetParamsPtr params_in)
    : action(std::move(action_in)),
      method(std::move(method_in)),
      enctype(std::move(enctype_in)),
      params(std::move(params_in)) {}

ManifestShareTarget::~ManifestShareTarget() = default;

void ManifestShareTarget::AsValueInto(base::trace_event::TracedValue* value) const {
  value->SetString("action", base::trace_event::ValueToString(this->action, "<value of type const ::blink::KURL&>"));
  value->SetString("method", base::trace_event::ValueToString(this->method));
  value->SetString("enctype", base::trace_event::ValueToString(this->enctype));
  if (this->params.is_null()) {
    value->SetString("params", "nullptr");
  } else {
    value->BeginDictionary("params");
    this->params->AsValueInto(value);
    value->EndDictionary();
  }
}

bool ManifestShareTarget::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ManifestFileHandler::ManifestFileHandler()
    : action(),
      name(),
      accept() {}

ManifestFileHandler::ManifestFileHandler(
    const ::blink::KURL& action_in,
    const ::WTF::String& name_in,
    const WTF::HashMap<::WTF::String, WTF::Vector<::WTF::String>>& accept_in)
    : action(std::move(action_in)),
      name(std::move(name_in)),
      accept(std::move(accept_in)) {}

ManifestFileHandler::~ManifestFileHandler() = default;

void ManifestFileHandler::AsValueInto(base::trace_event::TracedValue* value) const {
  value->SetString("action", base::trace_event::ValueToString(this->action, "<value of type const ::blink::KURL&>"));
  value->SetString("name", base::trace_event::ValueToString(this->name, "<value of type const ::WTF::String&>"));
  value->BeginDictionary("accept");
  for (const auto& item0 : this->accept) {
    value->BeginArrayWithCopiedName(base::trace_event::ValueToString(item0.key, "<value of type const ::WTF::String&>"));
    for (const auto& item1 : item0.value) {
      value->AppendString(base::trace_event::ValueToString(item1, "<value of type const ::WTF::String&>"));
    }
    value->EndArray();
  }
  value->EndDictionary();
}

bool ManifestFileHandler::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ManifestDebugInfo::ManifestDebugInfo()
    : errors(),
      raw_manifest() {}

ManifestDebugInfo::ManifestDebugInfo(
    WTF::Vector<ManifestErrorPtr> errors_in,
    const WTF::String& raw_manifest_in)
    : errors(std::move(errors_in)),
      raw_manifest(std::move(raw_manifest_in)) {}

ManifestDebugInfo::~ManifestDebugInfo() = default;

void ManifestDebugInfo::AsValueInto(base::trace_event::TracedValue* value) const {
  value->BeginArray("errors");
  for (const auto& item0 : this->errors) {
    if (item0.is_null()) {
      value->AppendString("nullptr");
    } else {
      value->BeginDictionary();
      item0->AsValueInto(value);
      value->EndDictionary();
    }
  }
  value->EndArray();
  value->SetString("raw_manifest", this->raw_manifest.Utf8());
}

bool ManifestDebugInfo::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
ManifestError::ManifestError()
    : message(),
      critical(),
      line(),
      column() {}

ManifestError::ManifestError(
    const WTF::String& message_in,
    bool critical_in,
    uint32_t line_in,
    uint32_t column_in)
    : message(std::move(message_in)),
      critical(std::move(critical_in)),
      line(std::move(line_in)),
      column(std::move(column_in)) {}

ManifestError::~ManifestError() = default;
size_t ManifestError::Hash(size_t seed) const {
  seed = mojo::internal::WTFHash(seed, this->message);
  seed = mojo::internal::WTFHash(seed, this->critical);
  seed = mojo::internal::WTFHash(seed, this->line);
  seed = mojo::internal::WTFHash(seed, this->column);
  return seed;
}

void ManifestError::AsValueInto(base::trace_event::TracedValue* value) const {
  value->SetString("message", this->message.Utf8());
  value->SetBoolean("critical", this->critical);
  value->SetString("line", base::NumberToString(this->line));
  value->SetString("column", base::NumberToString(this->column));
}

bool ManifestError::Validate(
    const void* data,
    mojo::internal::ValidationContext* validation_context) {
  return Data_::Validate(data, validation_context);
}
}  // namespace blink
}  // namespace mojom
}  // namespace blink

namespace mojo {


// static
bool StructTraits<::blink::mojom::blink::Manifest::DataView, ::blink::mojom::blink::ManifestPtr>::Read(
    ::blink::mojom::blink::Manifest::DataView input,
    ::blink::mojom::blink::ManifestPtr* output) {
  bool success = true;
  ::blink::mojom::blink::ManifestPtr result(::blink::mojom::blink::Manifest::New());
  
      if (success && !input.ReadName(&result->name))
        success = false;
      if (success && !input.ReadShortName(&result->short_name))
        success = false;
      if (success && !input.ReadStartUrl(&result->start_url))
        success = false;
      if (success && !input.ReadDisplay(&result->display))
        success = false;
      if (success && !input.ReadDisplayOverride(&result->display_override))
        success = false;
      if (success && !input.ReadOrientation(&result->orientation))
        success = false;
      if (success && !input.ReadIcons(&result->icons))
        success = false;
      if (success && !input.ReadShortcuts(&result->shortcuts))
        success = false;
      if (success && !input.ReadShareTarget(&result->share_target))
        success = false;
      if (success && !input.ReadFileHandlers(&result->file_handlers))
        success = false;
      if (success && !input.ReadProtocolHandlers(&result->protocol_handlers))
        success = false;
      if (success && !input.ReadRelatedApplications(&result->related_applications))
        success = false;
      if (success)
        result->prefer_related_applications = input.prefer_related_applications();
      if (success)
        result->has_theme_color = input.has_theme_color();
      if (success)
        result->theme_color = input.theme_color();
      if (success)
        result->has_background_color = input.has_background_color();
      if (success)
        result->background_color = input.background_color();
      if (success && !input.ReadGcmSenderId(&result->gcm_sender_id))
        success = false;
      if (success && !input.ReadScope(&result->scope))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::blink::ManifestShortcutItem::DataView, ::blink::mojom::blink::ManifestShortcutItemPtr>::Read(
    ::blink::mojom::blink::ManifestShortcutItem::DataView input,
    ::blink::mojom::blink::ManifestShortcutItemPtr* output) {
  bool success = true;
  ::blink::mojom::blink::ManifestShortcutItemPtr result(::blink::mojom::blink::ManifestShortcutItem::New());
  
      if (success && !input.ReadName(&result->name))
        success = false;
      if (success && !input.ReadShortName(&result->short_name))
        success = false;
      if (success && !input.ReadDescription(&result->description))
        success = false;
      if (success && !input.ReadUrl(&result->url))
        success = false;
      if (success && !input.ReadIcons(&result->icons))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::blink::ManifestImageResource::DataView, ::blink::mojom::blink::ManifestImageResourcePtr>::Read(
    ::blink::mojom::blink::ManifestImageResource::DataView input,
    ::blink::mojom::blink::ManifestImageResourcePtr* output) {
  bool success = true;
  ::blink::mojom::blink::ManifestImageResourcePtr result(::blink::mojom::blink::ManifestImageResource::New());
  
      if (success && !input.ReadSrc(&result->src))
        success = false;
      if (success && !input.ReadType(&result->type))
        success = false;
      if (success && !input.ReadSizes(&result->sizes))
        success = false;
      if (success && !input.ReadPurpose(&result->purpose))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::blink::ManifestFileFilter::DataView, ::blink::mojom::blink::ManifestFileFilterPtr>::Read(
    ::blink::mojom::blink::ManifestFileFilter::DataView input,
    ::blink::mojom::blink::ManifestFileFilterPtr* output) {
  bool success = true;
  ::blink::mojom::blink::ManifestFileFilterPtr result(::blink::mojom::blink::ManifestFileFilter::New());
  
      if (success && !input.ReadName(&result->name))
        success = false;
      if (success && !input.ReadAccept(&result->accept))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::blink::ManifestProtocolHandler::DataView, ::blink::mojom::blink::ManifestProtocolHandlerPtr>::Read(
    ::blink::mojom::blink::ManifestProtocolHandler::DataView input,
    ::blink::mojom::blink::ManifestProtocolHandlerPtr* output) {
  bool success = true;
  ::blink::mojom::blink::ManifestProtocolHandlerPtr result(::blink::mojom::blink::ManifestProtocolHandler::New());
  
      if (success && !input.ReadProtocol(&result->protocol))
        success = false;
      if (success && !input.ReadUrl(&result->url))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::blink::ManifestRelatedApplication::DataView, ::blink::mojom::blink::ManifestRelatedApplicationPtr>::Read(
    ::blink::mojom::blink::ManifestRelatedApplication::DataView input,
    ::blink::mojom::blink::ManifestRelatedApplicationPtr* output) {
  bool success = true;
  ::blink::mojom::blink::ManifestRelatedApplicationPtr result(::blink::mojom::blink::ManifestRelatedApplication::New());
  
      if (success && !input.ReadPlatform(&result->platform))
        success = false;
      if (success && !input.ReadUrl(&result->url))
        success = false;
      if (success && !input.ReadId(&result->id))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::blink::ManifestShareTargetParams::DataView, ::blink::mojom::blink::ManifestShareTargetParamsPtr>::Read(
    ::blink::mojom::blink::ManifestShareTargetParams::DataView input,
    ::blink::mojom::blink::ManifestShareTargetParamsPtr* output) {
  bool success = true;
  ::blink::mojom::blink::ManifestShareTargetParamsPtr result(::blink::mojom::blink::ManifestShareTargetParams::New());
  
      if (success && !input.ReadTitle(&result->title))
        success = false;
      if (success && !input.ReadText(&result->text))
        success = false;
      if (success && !input.ReadUrl(&result->url))
        success = false;
      if (success && !input.ReadFiles(&result->files))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::blink::ManifestShareTarget::DataView, ::blink::mojom::blink::ManifestShareTargetPtr>::Read(
    ::blink::mojom::blink::ManifestShareTarget::DataView input,
    ::blink::mojom::blink::ManifestShareTargetPtr* output) {
  bool success = true;
  ::blink::mojom::blink::ManifestShareTargetPtr result(::blink::mojom::blink::ManifestShareTarget::New());
  
      if (success && !input.ReadAction(&result->action))
        success = false;
      if (success && !input.ReadMethod(&result->method))
        success = false;
      if (success && !input.ReadEnctype(&result->enctype))
        success = false;
      if (success && !input.ReadParams(&result->params))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::blink::ManifestFileHandler::DataView, ::blink::mojom::blink::ManifestFileHandlerPtr>::Read(
    ::blink::mojom::blink::ManifestFileHandler::DataView input,
    ::blink::mojom::blink::ManifestFileHandlerPtr* output) {
  bool success = true;
  ::blink::mojom::blink::ManifestFileHandlerPtr result(::blink::mojom::blink::ManifestFileHandler::New());
  
      if (success && !input.ReadAction(&result->action))
        success = false;
      if (success && !input.ReadName(&result->name))
        success = false;
      if (success && !input.ReadAccept(&result->accept))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::blink::ManifestDebugInfo::DataView, ::blink::mojom::blink::ManifestDebugInfoPtr>::Read(
    ::blink::mojom::blink::ManifestDebugInfo::DataView input,
    ::blink::mojom::blink::ManifestDebugInfoPtr* output) {
  bool success = true;
  ::blink::mojom::blink::ManifestDebugInfoPtr result(::blink::mojom::blink::ManifestDebugInfo::New());
  
      if (success && !input.ReadErrors(&result->errors))
        success = false;
      if (success && !input.ReadRawManifest(&result->raw_manifest))
        success = false;
  *output = std::move(result);
  return success;
}


// static
bool StructTraits<::blink::mojom::blink::ManifestError::DataView, ::blink::mojom::blink::ManifestErrorPtr>::Read(
    ::blink::mojom::blink::ManifestError::DataView input,
    ::blink::mojom::blink::ManifestErrorPtr* output) {
  bool success = true;
  ::blink::mojom::blink::ManifestErrorPtr result(::blink::mojom::blink::ManifestError::New());
  
      if (success && !input.ReadMessage(&result->message))
        success = false;
      if (success)
        result->critical = input.critical();
      if (success)
        result->line = input.line();
      if (success)
        result->column = input.column();
  *output = std::move(result);
  return success;
}

}  // namespace mojo

#if defined(__clang__)
#pragma clang diagnostic pop
#endif