• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
7 namespace mojo {
8 
9 // static
New()10 NativeStructPtr NativeStruct::New() {
11   NativeStructPtr rv;
12   internal::StructHelper<NativeStruct>::Initialize(&rv);
13   return rv;
14 }
15 
NativeStruct()16 NativeStruct::NativeStruct() : data(nullptr) {}
17 
~NativeStruct()18 NativeStruct::~NativeStruct() {}
19 
Clone() const20 NativeStructPtr NativeStruct::Clone() const {
21   NativeStructPtr rv(New());
22   rv->data = data.Clone();
23   return rv;
24 }
25 
Equals(const NativeStruct & other) const26 bool NativeStruct::Equals(const NativeStruct& other) const {
27   return data.Equals(other.data);
28 }
29 
30 }  // namespace mojo
31