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

Unified Diff: runtime/bin/vmservice_impl.h

Issue 19231005: Initial NOOP VM Service (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
Index: runtime/bin/vmservice_impl.h
diff --git a/runtime/bin/vmservice_impl.h b/runtime/bin/vmservice_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..9ecdf7c0f2aa7b78aea2fccd63fb5f05c0c0b5e9
--- /dev/null
+++ b/runtime/bin/vmservice_impl.h
@@ -0,0 +1,56 @@
+// 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 BIN_VMSERVICE_IMPL_H_
+#define BIN_VMSERVICE_IMPL_H_
+
+#include "bin/vmservice.h"
+#include "platform/thread.h"
+
+
+namespace dart {
+namespace bin {
+
+class VmService {
+ public:
+ // Returns false if service could not be started.
+ static bool Start(intptr_t server_port);
+ // Error message if startup failed.
+ static const char* GetErrorMessage();
+
+ static Dart_Port get_port();
siva 2013/07/15 21:40:16 why get_port() and not just port() ?
Cutch 2013/07/15 21:58:38 Done.
+
+ static bool IsRunning();
+
+ static bool SendIsolateStartupMessage(Dart_Port port);
+ static bool SendIsolateShutdownMessage(Dart_Port port);
+
+ private:
+ static bool _Start(intptr_t server_port);
+ static void _Stop();
+ 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 void ThreadMain(uword parameters);
+
+ static Dart_Isolate isolate_;
+ static Dart_Port port_;
+ static const char* error_msg_;
+ static dart::Monitor* monitor_;
+
+ DISALLOW_ALLOCATION();
+ DISALLOW_IMPLICIT_CONSTRUCTORS(VmService);
+};
+
+void Dart_VmServiceShutdownCallback();
siva 2013/07/15 21:40:16 I don't see an reference to this methods, where is
Cutch 2013/07/15 21:58:38 It's not right now. I've removed it for now.
+
+
+} // namespace bin
+} // namespace dart
+
+#endif // BIN_VMSERVICE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698