| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SKY_ENGINE_BINDINGS2_DART_CALLBACK_H_ | |
| 6 #define SKY_ENGINE_BINDINGS2_DART_CALLBACK_H_ | |
| 7 | |
| 8 #include "dart/runtime/include/dart_api.h" | |
| 9 #include "sky/engine/tonic/dart_persistent_value.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class DartCallback { | |
| 14 public: | |
| 15 DartCallback(DartState* dart_state, | |
| 16 Dart_Handle callback, | |
| 17 Dart_Handle& exception); | |
| 18 ~DartCallback(); | |
| 19 | |
| 20 bool handleEvent(int argc, Dart_Handle* argv); | |
| 21 | |
| 22 bool IsIsolateAlive() const; | |
| 23 Dart_Isolate GetIsolate() const; | |
| 24 | |
| 25 private: | |
| 26 DartPersistentValue callback_; | |
| 27 }; | |
| 28 } | |
| 29 | |
| 30 #endif // SKY_ENGINE_BINDINGS2_DART_CALLBACK_H_ | |
| OLD | NEW |