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

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

Issue 915293003: Rename sky/engine/bindings2 to sky/engine/bindings (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: more better 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/dart_callback.h ('k') | sky/engine/bindings2/dart_event_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings2/dart_callback.cc
diff --git a/sky/engine/bindings2/dart_callback.cc b/sky/engine/bindings2/dart_callback.cc
deleted file mode 100644
index 8ce029d83a8d66cfa815694c866610765ec6ce8a..0000000000000000000000000000000000000000
--- a/sky/engine/bindings2/dart_callback.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// 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.
-
-#include "sky/engine/config.h"
-#include "sky/engine/bindings2/dart_callback.h"
-
-#include "sky/engine/tonic/dart_converter.h"
-#include "sky/engine/tonic/dart_error.h"
-#include "sky/engine/tonic/dart_state.h"
-
-namespace blink {
-
-DartCallback::DartCallback(DartState* dart_state,
- Dart_Handle callback,
- Dart_Handle& exception)
- : callback_(dart_state, callback) {
- if (!Dart_IsClosure(callback)) {
- exception = ToDart("Callback must be a function");
- callback_.Clear();
- }
-}
-
-DartCallback::~DartCallback() {
-}
-
-bool DartCallback::IsIsolateAlive() const {
- return !!callback_.dart_state();
-}
-
-Dart_Isolate DartCallback::GetIsolate() const {
- return callback_.dart_state()->isolate();
-}
-
-bool DartCallback::handleEvent(int argc, Dart_Handle* argv) {
- LogIfError(Dart_InvokeClosure(callback_.value(), argc, argv));
- return true;
-}
-
-} // namespace blink
« no previous file with comments | « sky/engine/bindings2/dart_callback.h ('k') | sky/engine/bindings2/dart_event_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698