Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(970)

Side by Side Diff: third_party/WebKit/Source/core/mojo/MojoHandle.h

Issue 2405093003: [WIP] Mojo native bindings interface.
Patch Set: cleanup 2 Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MojoHandle_h
6 #define MojoHandle_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "mojo/public/cpp/system/handle.h"
10
11 namespace blink {
12
13 class MojoHandle final : public GarbageCollectedFinalized<MojoHandle>,
14 public ScriptWrappable {
15 DEFINE_WRAPPERTYPEINFO();
16
17 public:
18 CORE_EXPORT static MojoHandle* create(mojo::ScopedHandle);
19 virtual ~MojoHandle();
20
21 ::MojoHandle value() const { return m_handle.get().value(); }
22 mojo::Handle get() const { return m_handle.get(); }
23 mojo::Handle release() { return m_handle.release(); }
24 MojoResult close() { return mojo::CloseRaw(m_handle.release()); }
25
26 DEFINE_INLINE_TRACE() {}
27
28 private:
29 explicit MojoHandle(mojo::ScopedHandle);
30
31 mojo::ScopedHandle m_handle;
32 };
33
34 } // namespace blink
35
36 #endif // MojoHandle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698