Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BIN_VMSERVICE_IMPL_H_ | |
| 6 #define BIN_VMSERVICE_IMPL_H_ | |
| 7 | |
| 8 #include "bin/vmservice.h" | |
| 9 #include "platform/thread.h" | |
| 10 | |
| 11 | |
| 12 namespace dart { | |
| 13 namespace bin { | |
| 14 | |
| 15 class VmService { | |
| 16 public: | |
| 17 // Returns false if service could not be started. | |
| 18 static bool Start(intptr_t server_port); | |
| 19 // Error message if startup failed. | |
| 20 static const char* GetErrorMessage(); | |
| 21 | |
| 22 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.
| |
| 23 | |
| 24 static bool IsRunning(); | |
| 25 | |
| 26 static bool SendIsolateStartupMessage(Dart_Port port); | |
| 27 static bool SendIsolateShutdownMessage(Dart_Port port); | |
| 28 | |
| 29 private: | |
| 30 static bool _Start(intptr_t server_port); | |
| 31 static void _Stop(); | |
| 32 static Dart_Handle LoadScript(const char* name); | |
| 33 static Dart_Handle LoadSources(Dart_Handle library, const char** names); | |
| 34 static Dart_Handle LoadSource(Dart_Handle library, const char* name); | |
| 35 static Dart_Handle LoadResources(Dart_Handle library); | |
| 36 static Dart_Handle LoadResource(Dart_Handle library, const char* name, | |
| 37 const char* prefix); | |
| 38 | |
| 39 static void ThreadMain(uword parameters); | |
| 40 | |
| 41 static Dart_Isolate isolate_; | |
| 42 static Dart_Port port_; | |
| 43 static const char* error_msg_; | |
| 44 static dart::Monitor* monitor_; | |
| 45 | |
| 46 DISALLOW_ALLOCATION(); | |
| 47 DISALLOW_IMPLICIT_CONSTRUCTORS(VmService); | |
| 48 }; | |
| 49 | |
| 50 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.
| |
| 51 | |
| 52 | |
| 53 } // namespace bin | |
| 54 } // namespace dart | |
| 55 | |
| 56 #endif // BIN_VMSERVICE_IMPL_H_ | |
| OLD | NEW |