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