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

Unified Diff: runtime/vm/service_isolate.h

Issue 920813003: Refactor service code and service method parameters (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service_isolate.h
diff --git a/runtime/vm/service_isolate.h b/runtime/vm/service_isolate.h
new file mode 100644
index 0000000000000000000000000000000000000000..824d136de823e54d6d7794913dd834a9cccdb98f
--- /dev/null
+++ b/runtime/vm/service_isolate.h
@@ -0,0 +1,60 @@
+// 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 VM_SERVICE_ISOLATE_H_
+#define VM_SERVICE_ISOLATE_H_
+
+#include "include/dart_api.h"
+
+#include "vm/allocation.h"
+#include "vm/os_thread.h"
+
+namespace dart {
+
+class ServiceIsolate : public AllStatic {
+ public:
+ static const char* kName;
+ static bool NameEquals(const char* name);
+
+ static bool Exists();
+ static bool IsRunning();
+ static bool IsServiceIsolate(Isolate* isolate);
+ static Dart_Port Port();
+
+ static Dart_Port WaitForLoadPort();
+ static Dart_Port LoadPort();
+
+ static void Run();
+ static bool SendIsolateStartupMessage();
+ static bool SendIsolateShutdownMessage();
+
+ protected:
+ static void SetServicePort(Dart_Port port);
+ static void SetServiceIsolate(Isolate* isolate);
+ static void SetLoadPort(Dart_Port port);
+ static void FinishedInitializing();
+ static void MaybeInjectVMServiceLibrary(Isolate* isolate);
+ static Dart_IsolateCreateCallback create_callback() {
+ return create_callback_;
+ }
+
+ static Dart_Handle GetSource(const char* name);
+ static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, Dart_Handle library,
+ Dart_Handle url);
+
+ static Dart_IsolateCreateCallback create_callback_;
+ static Monitor* monitor_;
+ static bool initializing_;
+ static Isolate* isolate_;
+ static Dart_Port port_;
+ static Dart_Port load_port_;
+
+ friend class Dart;
+ friend class RunServiceTask;
+ friend class ServiceIsolateNatives;
+};
+
+} // namespace dart
+
+#endif // VM_SERVICE_ISOLATE_H_
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698