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

Unified Diff: third_party/WebKit/Source/core/mojo/Mojo.cpp

Issue 2400563002: Adds Mojo IDL. (Closed)
Patch Set: fixes modulename typo 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698