| Index: third_party/WebKit/Source/core/mojo/MojoHandle.h
|
| diff --git a/third_party/WebKit/Source/core/mojo/MojoHandle.h b/third_party/WebKit/Source/core/mojo/MojoHandle.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..695a09fd3cb82723e78cc4cb12f604e0949b84c6
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/mojo/MojoHandle.h
|
| @@ -0,0 +1,36 @@
|
| +// 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 MojoHandle_h
|
| +#define MojoHandle_h
|
| +
|
| +#include "bindings/core/v8/ScriptWrappable.h"
|
| +#include "mojo/public/cpp/system/handle.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class MojoHandle final : public GarbageCollectedFinalized<MojoHandle>,
|
| + public ScriptWrappable {
|
| + DEFINE_WRAPPERTYPEINFO();
|
| +
|
| + public:
|
| + CORE_EXPORT static MojoHandle* create(mojo::ScopedHandle);
|
| + virtual ~MojoHandle();
|
| +
|
| + ::MojoHandle value() const { return m_handle.get().value(); }
|
| + mojo::Handle get() const { return m_handle.get(); }
|
| + mojo::Handle release() { return m_handle.release(); }
|
| + MojoResult close() { return mojo::CloseRaw(m_handle.release()); }
|
| +
|
| + DEFINE_INLINE_TRACE() {}
|
| +
|
| + private:
|
| + explicit MojoHandle(mojo::ScopedHandle);
|
| +
|
| + mojo::ScopedHandle m_handle;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // MojoHandle_h
|
|
|