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

Unified Diff: sky/engine/bindings2/dart_callback.h

Issue 918333002: Add the c++ code part of bindings2/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Updated per earlier reviews Created 5 years, 10 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
« no previous file with comments | « sky/engine/bindings2/builtin_sky.cc ('k') | sky/engine/bindings2/dart_callback.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings2/dart_callback.h
diff --git a/sky/engine/bindings2/dart_callback.h b/sky/engine/bindings2/dart_callback.h
new file mode 100644
index 0000000000000000000000000000000000000000..78c54a636c12fff9c7b183f776b31bc926b7ef5c
--- /dev/null
+++ b/sky/engine/bindings2/dart_callback.h
@@ -0,0 +1,30 @@
+// Copyright 2015 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 SKY_ENGINE_BINDINGS2_DART_CALLBACK_H_
+#define SKY_ENGINE_BINDINGS2_DART_CALLBACK_H_
+
+#include "dart/runtime/include/dart_api.h"
+#include "sky/engine/tonic/dart_persistent_value.h"
+
+namespace blink {
+
+class DartCallback {
+ public:
+ DartCallback(DartState* dart_state,
+ Dart_Handle callback,
+ Dart_Handle& exception);
+ ~DartCallback();
+
+ bool handleEvent(int argc, Dart_Handle* argv);
+
+ bool IsIsolateAlive() const;
+ Dart_Isolate GetIsolate() const;
+
+ private:
+ DartPersistentValue callback_;
+};
+}
+
+#endif // SKY_ENGINE_BINDINGS2_DART_CALLBACK_H_
« no previous file with comments | « sky/engine/bindings2/builtin_sky.cc ('k') | sky/engine/bindings2/dart_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698