Chromium Code Reviews| Index: third_party/WebKit/Source/core/mojo/MojoScopedHandle.h |
| diff --git a/third_party/WebKit/Source/core/mojo/MojoScopedHandle.h b/third_party/WebKit/Source/core/mojo/MojoScopedHandle.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d38c6dc268885dd13951815481766d7cc3474dd2 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/mojo/MojoScopedHandle.h |
| @@ -0,0 +1,27 @@ |
| +// 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 MojoScopedHandle_h |
| +#define MojoScopedHandle_h |
| + |
| +#include "mojo/public/c/system/core.h" |
| + |
| +namespace blink { |
| + |
| +class MojoScopedHandle { |
|
Ken Rockot(use gerrit already)
2016/10/18 15:47:10
Why can't you use mojo::ScopedHandle in mojo/publi
alokp
2016/10/18 16:48:37
It would add a dependency on mojo/public/cpp, whic
|
| + public: |
| + explicit MojoScopedHandle(::MojoHandle); |
| + virtual ~MojoScopedHandle(); |
| + |
| + ::MojoHandle get() const { return m_handle; } |
| + ::MojoHandle release(); |
| + MojoResult close(); |
| + |
| + private: |
| + ::MojoHandle m_handle; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // MojoScopedHandle_h |