diff options
author | Jay Civelli <jcivelli@google.com> | 2017-03-29 16:17:00 -0700 |
---|---|---|
committer | Jay Civelli <jcivelli@google.com> | 2017-07-24 13:31:43 -0700 |
commit | 8ac9103e05b66812c25348943383f9365d1ce3e0 (patch) | |
tree | 63a61c9698e719de1a24de6fca21e29401f92842 /mojo/public/cpp/bindings/array_traits_wtf.h | |
parent | 24543f227908c2e949bb9a15b40276f59fcc9a0a (diff) | |
download | libmojo-8ac9103e05b66812c25348943383f9365d1ce3e0.tar.gz |
libmojo: Uprev the library to r456626 from Chromium
Pulled the latest and greatest version of libmojo from Chromium.
The merge was done against r456626 which corresponds to git commit
08266b3fca707804065a2cfd60331722ade41969 of Mar 14, 2017
Notable changes are:
- generated binding files are now split in 2 files, interface.mojom.h
and interface.mojom-shared.h
Change-Id: Idcfd27310e2c9d3c452b671c7ff7a755c3963618
Diffstat (limited to 'mojo/public/cpp/bindings/array_traits_wtf.h')
-rw-r--r-- | mojo/public/cpp/bindings/array_traits_wtf.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/mojo/public/cpp/bindings/array_traits_wtf.h b/mojo/public/cpp/bindings/array_traits_wtf.h deleted file mode 100644 index 7e773fc..0000000 --- a/mojo/public/cpp/bindings/array_traits_wtf.h +++ /dev/null @@ -1,40 +0,0 @@ -// 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 MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_WTF_H_ -#define MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_WTF_H_ - -#include "mojo/public/cpp/bindings/array_traits.h" -#include "mojo/public/cpp/bindings/wtf_array.h" - -namespace mojo { - -template <typename U> -struct ArrayTraits<WTFArray<U>> { - using Element = U; - - static bool IsNull(const WTFArray<U>& input) { return input.is_null(); } - static void SetToNull(WTFArray<U>* output) { *output = nullptr; } - - static size_t GetSize(const WTFArray<U>& input) { return input.size(); } - - static U* GetData(WTFArray<U>& input) { return &input.front(); } - - static const U* GetData(const WTFArray<U>& input) { return &input.front(); } - - static U& GetAt(WTFArray<U>& input, size_t index) { return input[index]; } - - static const U& GetAt(const WTFArray<U>& input, size_t index) { - return input[index]; - } - - static bool Resize(WTFArray<U>& input, size_t size) { - input.resize(size); - return true; - } -}; - -} // namespace mojo - -#endif // MOJO_PUBLIC_CPP_BINDINGS_ARRAY_TRAITS_WTF_H_ |