| Index: third_party/WebKit/Source/bindings/core/v8/IDLTypesBase.h
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/IDLTypesBase.h b/third_party/WebKit/Source/bindings/core/v8/IDLTypesBase.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..42819078d81efd14c5a8f2978b7a25d11a32f810
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/IDLTypesBase.h
|
| @@ -0,0 +1,29 @@
|
| +// Copyright (c) 2017 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 IDLTypesBase_h
|
| +#define IDLTypesBase_h
|
| +
|
| +namespace blink {
|
| +
|
| +// This is the base type for all WebIDL types, such as the ones defined in
|
| +// IDLTypes.h. It is defined in a separate location to avoid circular header
|
| +// inclusions when one only needs to check if a type inherits from IDLBase.
|
| +struct IDLBase {
|
| + using ImplType = void;
|
| +};
|
| +
|
| +// If a child class returns a simple type known at the time it is declared, it
|
| +// can inherit from IDLBaseHelper to avoid having to set ImplType on its own.
|
| +//
|
| +// Example:
|
| +// struct MyType<double> final : public IDLBaseHelper<double> {};
|
| +template <typename T>
|
| +struct IDLBaseHelper : public IDLBase {
|
| + using ImplType = T;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // IDLTypesBase_h
|
|
|