Chromium Code Reviews| Index: Source/bindings/dart/DartService.h |
| diff --git a/Source/bindings/dart/DartService.h b/Source/bindings/dart/DartService.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e65aaf2659f19f0031065f3604fc3fbb23d7fa26 |
| --- /dev/null |
| +++ b/Source/bindings/dart/DartService.h |
| @@ -0,0 +1,51 @@ |
| +// 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. |
| + |
| +#ifndef DartService_h |
| +#define DartService_h |
| + |
| +#include <dart_api.h> |
| + |
| +namespace WebCore { |
| + |
| +class DartServiceInternal; |
| +class Document; |
| + |
| +class DartService { |
| +public: |
| + // Returns false if service could not be started. |
| + static bool Start(Document*); |
| + static bool Stop(); |
| + |
| + // Error message if startup failed. |
| + static const char* GetErrorMessage(); |
| + |
| + static Dart_Port port(); |
| + static Dart_Port GetRequestPort() { return m_requestPort; } |
| + static bool IsRunning(); |
| + |
| + static bool SendIsolateStartupMessage(); |
| + static bool SendIsolateShutdownMessage(); |
| + |
| + static void VmServiceShutdownCallback(void* callbackData); |
| + |
| +private: |
| + static Dart_Handle GetSource(const char* name); |
| + static Dart_Handle LoadScript(const char* name); |
| + static Dart_Handle LoadSources(Dart_Handle library, const char** names); |
| + static Dart_Handle LoadSource(Dart_Handle library, const char* name); |
| + static Dart_Handle LoadResources(Dart_Handle library); |
| + static Dart_Handle LoadResource(Dart_Handle library, const char* name, const char* prefix); |
| + static Dart_Handle LibraryTagHandler(Dart_LibraryTag, Dart_Handle library, Dart_Handle url); |
| + static Dart_NativeFunction NativeResolver(Dart_Handle name, int numArguments); |
| + static Dart_Isolate m_isolate; |
| + static Dart_Port m_port; |
| + static Dart_Port m_requestPort; |
| + static const char* m_errorMsg; |
| + friend class DartServiceInternal; |
| +}; |
| + |
| +} |
|
siva
2013/12/13 21:48:22
} // namespace WebCore
|
| + |
| +#endif // DartService_h |