Index: sky/engine/core/script/dart_service_isolate.h |
diff --git a/sky/engine/core/script/dart_service_isolate.h b/sky/engine/core/script/dart_service_isolate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..78289b280369bcd83a888016d068f4fe1609abd4 |
--- /dev/null |
+++ b/sky/engine/core/script/dart_service_isolate.h |
@@ -0,0 +1,53 @@ |
+// 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_CORE_SCRIPT_DART_SERVICE_ISOLATE_H_ |
+#define SKY_ENGINE_CORE_SCRIPT_DART_SERVICE_ISOLATE_H_ |
+ |
+#include <string> |
+ |
+#include "include/dart_api.h" |
+#include "sky/engine/config.h" |
+#include "sky/engine/tonic/dart_builtin.h" |
+ |
+namespace blink { |
+ |
+class DartServiceIsolate { |
+ public: |
+ static bool Startup(std::string server_ip, |
+ intptr_t server_port, |
+ Dart_LibraryTagHandler embedder_tag_handler, |
+ char** error); |
+ |
+ private: |
+ // Native entries. |
+ static void TriggerResourceLoad(Dart_NativeArguments args); |
+ static void NotifyServerState(Dart_NativeArguments args); |
+ static void Shutdown(Dart_NativeArguments args); |
+ // Native entry resolution. |
+ static Dart_NativeFunction NativeResolver(Dart_Handle name, |
+ int argument_count, |
+ bool* auto_setup_scope); |
+ static const uint8_t* NativeSymbolizer(Dart_NativeFunction native_function); |
+ static DartBuiltin::Natives native_entries_[]; |
+ static DartBuiltin* builtins_; |
+ |
+ // Script loading. |
+ static Dart_Handle GetSource(const char* name); |
+ static Dart_Handle LoadScript(const char* name); |
+ static Dart_Handle LoadSource(Dart_Handle library, const char* name); |
+ static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, Dart_Handle library, |
+ Dart_Handle url); |
+ |
+ // Observatory resource loading. |
+ static Dart_Handle LoadResources(Dart_Handle library); |
+ static Dart_Handle LoadResource(Dart_Handle library, const char* name); |
+ |
+ static Dart_LibraryTagHandler embedder_tag_handler_; |
+}; |
+ |
+ |
+} // namespace blink |
+ |
+#endif // SKY_ENGINE_CORE_SCRIPT_DART_SERVICE_ISOLATE_H_ |