1// Copyright 2016 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#include "mojo/public/cpp/bindings/native_struct.h"
6
7namespace mojo {
8
9// static
10NativeStructPtr NativeStruct::New() {
11  NativeStructPtr rv;
12  internal::StructHelper<NativeStruct>::Initialize(&rv);
13  return rv;
14}
15
16NativeStruct::NativeStruct() : data(nullptr) {}
17
18NativeStruct::~NativeStruct() {}
19
20NativeStructPtr NativeStruct::Clone() const {
21  NativeStructPtr rv(New());
22  rv->data = data.Clone();
23  return rv;
24}
25
26bool NativeStruct::Equals(const NativeStruct& other) const {
27  return data.Equals(other.data);
28}
29
30}  // namespace mojo
31