| Index: mojo/public/cpp/bindings/string_traits_nullable_string16.h
|
| diff --git a/mojo/public/cpp/bindings/string_traits_nullable_string16.h b/mojo/public/cpp/bindings/string_traits_nullable_string16.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ff2621a9a508903c339366da412984546088b7c3
|
| --- /dev/null
|
| +++ b/mojo/public/cpp/bindings/string_traits_nullable_string16.h
|
| @@ -0,0 +1,35 @@
|
| +// 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_STRING_TRAITS_NULLABLE_STRING16_H_
|
| +#define MOJO_PUBLIC_CPP_BINDINGS_STRING_TRAITS_NULLABLE_STRING16_H_
|
| +
|
| +#include "base/strings/nullable_string16.h"
|
| +#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
|
| +#include "mojo/public/cpp/bindings/string_traits.h"
|
| +
|
| +namespace mojo {
|
| +
|
| +template <>
|
| +struct StringTraits<base::NullableString16> {
|
| + static bool IsNull(const base::NullableString16& input) {
|
| + return input.is_null();
|
| + }
|
| + static void SetToNull(base::NullableString16* output);
|
| +
|
| + static void* SetUpContext(const base::NullableString16& input);
|
| + static void TearDownContext(const base::NullableString16& input,
|
| + void* context);
|
| +
|
| + static size_t GetSize(const base::NullableString16& input, void* context);
|
| +
|
| + static const char* GetData(const base::NullableString16& input,
|
| + void* context);
|
| +
|
| + static bool Read(StringDataView input, base::NullableString16* output);
|
| +};
|
| +
|
| +} // namespace mojo
|
| +
|
| +#endif // MOJO_PUBLIC_CPP_BINDINGS_STRING_TRAITS_NULLABLE_STRING16_H_
|
|
|