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

Unified Diff: sky/engine/bindings-dart/core/dart/DartMutationCallback.cpp

Issue 875013003: Import Dart bindings as of Blink r188698. This merely copies the files over and does not attach any… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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: sky/engine/bindings-dart/core/dart/DartMutationCallback.cpp
diff --git a/sky/engine/bindings-dart/core/dart/DartMutationCallback.cpp b/sky/engine/bindings-dart/core/dart/DartMutationCallback.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5404ad026e6378a5d9855a87606ea42332a3d4c2
--- /dev/null
+++ b/sky/engine/bindings-dart/core/dart/DartMutationCallback.cpp
@@ -0,0 +1,28 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "config.h"
+#include "bindings/core/dart/DartMutationCallback.h"
+
+#include "bindings/core/dart/DartMutationObserver.h"
+#include "bindings/core/dart/DartMutationRecord.h"
+
+namespace blink {
+
+void DartMutationCallback::call(const Vector<RefPtr<MutationRecord> >& mutations, MutationObserver* observer)
+{
+ if (!m_callback.isIsolateAlive())
+ return;
+
+ DartIsolateScope scope(m_callback.isolate());
+ DartApiScope apiScope;
+
+ Dart_Handle arguments[] = {
+ DartDOMWrapper::vectorToDart<DartMutationRecord>(mutations),
+ DartMutationObserver::toDart(observer)
+ };
+ m_callback.handleEvent(2, arguments);
+}
+
+}
« no previous file with comments | « sky/engine/bindings-dart/core/dart/DartMutationCallback.h ('k') | sky/engine/bindings-dart/core/dart/DartNativeUtilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698