| OLD | NEW | 
|---|
| 1 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file | 
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a | 
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef VM_SERVICE_ISOLATE_H_ | 5 #ifndef VM_SERVICE_ISOLATE_H_ | 
| 6 #define VM_SERVICE_ISOLATE_H_ | 6 #define VM_SERVICE_ISOLATE_H_ | 
| 7 | 7 | 
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" | 
| 9 | 9 | 
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" | 
| 11 #include "vm/os_thread.h" | 11 #include "vm/os_thread.h" | 
| 12 | 12 | 
| 13 namespace dart { | 13 namespace dart { | 
| 14 | 14 | 
|  | 15 class ObjectPointerVisitor; | 
|  | 16 | 
| 15 class ServiceIsolate : public AllStatic { | 17 class ServiceIsolate : public AllStatic { | 
| 16  public: | 18  public: | 
| 17   static const char* kName; | 19   static const char* kName; | 
| 18   static bool NameEquals(const char* name); | 20   static bool NameEquals(const char* name); | 
| 19 | 21 | 
| 20   static bool Exists(); | 22   static bool Exists(); | 
| 21   static bool IsRunning(); | 23   static bool IsRunning(); | 
| 22   static bool IsServiceIsolate(const Isolate* isolate); | 24   static bool IsServiceIsolate(const Isolate* isolate); | 
| 23   static bool IsServiceIsolateDescendant(const Isolate* isolate); | 25   static bool IsServiceIsolateDescendant(const Isolate* isolate); | 
| 24   static Dart_Port Port(); | 26   static Dart_Port Port(); | 
| 25 | 27 | 
| 26   static Dart_Port WaitForLoadPort(); | 28   static Dart_Port WaitForLoadPort(); | 
| 27   static Dart_Port LoadPort(); | 29   static Dart_Port LoadPort(); | 
| 28 | 30 | 
| 29   static void Run(); | 31   static void Run(); | 
| 30   static bool SendIsolateStartupMessage(); | 32   static bool SendIsolateStartupMessage(); | 
| 31   static bool SendIsolateShutdownMessage(); | 33   static bool SendIsolateShutdownMessage(); | 
| 32   static void SendServiceExitMessage(); | 34   static void SendServiceExitMessage(); | 
| 33   static void Shutdown(); | 35   static void Shutdown(); | 
| 34 | 36 | 
| 35   static void BootVmServiceLibrary(); | 37   static void BootVmServiceLibrary(); | 
| 36 | 38 | 
| 37   static void SetServerAddress(const char* address); | 39   static void SetServerAddress(const char* address); | 
| 38 | 40 | 
| 39   // Returns the server's web address or NULL if none is running. | 41   // Returns the server's web address or NULL if none is running. | 
| 40   static const char* server_address() { | 42   static const char* server_address() { | 
| 41     return server_address_; | 43     return server_address_; | 
| 42   } | 44   } | 
| 43 | 45 | 
|  | 46   static void VisitObjectPointers(ObjectPointerVisitor* visitor); | 
|  | 47 | 
| 44  private: | 48  private: | 
| 45   static void KillServiceIsolate(); | 49   static void KillServiceIsolate(); | 
| 46 | 50 | 
| 47  protected: | 51  protected: | 
| 48   static void SetServicePort(Dart_Port port); | 52   static void SetServicePort(Dart_Port port); | 
| 49   static void SetServiceIsolate(Isolate* isolate); | 53   static void SetServiceIsolate(Isolate* isolate); | 
| 50   static void SetLoadPort(Dart_Port port); | 54   static void SetLoadPort(Dart_Port port); | 
| 51   static void ConstructExitMessageAndCache(Isolate* isolate); | 55   static void ConstructExitMessageAndCache(Isolate* isolate); | 
| 52   static void FinishedExiting(); | 56   static void FinishedExiting(); | 
| 53   static void FinishedInitializing(); | 57   static void FinishedInitializing(); | 
| (...skipping 15 matching lines...) Expand all  Loading... | 
| 69   static char* server_address_; | 73   static char* server_address_; | 
| 70 | 74 | 
| 71   friend class Dart; | 75   friend class Dart; | 
| 72   friend class RunServiceTask; | 76   friend class RunServiceTask; | 
| 73   friend class ServiceIsolateNatives; | 77   friend class ServiceIsolateNatives; | 
| 74 }; | 78 }; | 
| 75 | 79 | 
| 76 }  // namespace dart | 80 }  // namespace dart | 
| 77 | 81 | 
| 78 #endif  // VM_SERVICE_ISOLATE_H_ | 82 #endif  // VM_SERVICE_ISOLATE_H_ | 
| OLD | NEW | 
|---|