Index: third_party/WebKit/Source/core/mojo/Mojo.cpp |
diff --git a/third_party/WebKit/Source/core/mojo/Mojo.cpp b/third_party/WebKit/Source/core/mojo/Mojo.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c83a1ba8db9ce5f5b35158c006cb93f6e6c80304 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/mojo/Mojo.cpp |
@@ -0,0 +1,28 @@ |
+// 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. |
+ |
+#include "core/mojo/Mojo.h" |
+ |
+#include "bindings/core/v8/V8MojoHandle.h" |
+ |
+namespace blink { |
+ |
+MojoResult Mojo::close(MojoHandle* handle) { |
+ LOG(INFO) << __FUNCTION__; |
+ return handle->close(); |
+} |
+ |
+bool Mojo::isHandle(const ScriptValue& value) { |
+ LOG(INFO) << __FUNCTION__; |
+ return true; |
+ |
+ if (value.isEmpty()) { |
+ LOG(INFO) << __FUNCTION__ << "Empty handle."; |
+ return false; |
+ } |
+ |
+ return !!V8MojoHandle::toImplWithTypeCheck(value.isolate(), value.v8Value()); |
+} |
+ |
+} // namespace blink |