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

Side by Side Diff: runtime/vm/service_isolate.h

Issue 2438613002: Provide an API to dart:developer to control the web server hosting the Service Protocol (Closed)
Patch Set: CHANGELOG.md merge and fatal error Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 RUNTIME_VM_SERVICE_ISOLATE_H_ 5 #ifndef RUNTIME_VM_SERVICE_ISOLATE_H_
6 #define RUNTIME_VM_SERVICE_ISOLATE_H_ 6 #define RUNTIME_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; 15 class ObjectPointerVisitor;
16 class SendPort;
16 17
17 class ServiceIsolate : public AllStatic { 18 class ServiceIsolate : public AllStatic {
18 public: 19 public:
19 static const char* kName; 20 static const char* kName;
20 static bool NameEquals(const char* name); 21 static bool NameEquals(const char* name);
21 22
22 static bool Exists(); 23 static bool Exists();
23 static bool IsRunning(); 24 static bool IsRunning();
24 static bool IsServiceIsolate(const Isolate* isolate); 25 static bool IsServiceIsolate(const Isolate* isolate);
25 static bool IsServiceIsolateDescendant(const Isolate* isolate); 26 static bool IsServiceIsolateDescendant(const Isolate* isolate);
26 static Dart_Port Port(); 27 static Dart_Port Port();
27 28
28 static Dart_Port WaitForLoadPort(); 29 static Dart_Port WaitForLoadPort();
29 static Dart_Port LoadPort(); 30 static Dart_Port LoadPort();
30 31
31 static void Run(); 32 static void Run();
32 static bool SendIsolateStartupMessage(); 33 static bool SendIsolateStartupMessage();
33 static bool SendIsolateShutdownMessage(); 34 static bool SendIsolateShutdownMessage();
34 static void SendServiceExitMessage(); 35 static void SendServiceExitMessage();
35 static void Shutdown(); 36 static void Shutdown();
36 37
37 static void BootVmServiceLibrary(); 38 static void BootVmServiceLibrary();
38 39
40 static void RequestServerInfo(const SendPort& sp);
41 static void ControlWebServer(const SendPort& sp, bool enable);
42
39 static void SetServerAddress(const char* address); 43 static void SetServerAddress(const char* address);
40 44
41 // Returns the server's web address or NULL if none is running. 45 // Returns the server's web address or NULL if none is running.
42 static const char* server_address() { 46 static const char* server_address() {
43 return server_address_; 47 return server_address_;
44 } 48 }
45 49
46 static void VisitObjectPointers(ObjectPointerVisitor* visitor); 50 static void VisitObjectPointers(ObjectPointerVisitor* visitor);
47 51
48 private: 52 private:
(...skipping 24 matching lines...) Expand all
73 static char* server_address_; 77 static char* server_address_;
74 78
75 friend class Dart; 79 friend class Dart;
76 friend class RunServiceTask; 80 friend class RunServiceTask;
77 friend class ServiceIsolateNatives; 81 friend class ServiceIsolateNatives;
78 }; 82 };
79 83
80 } // namespace dart 84 } // namespace dart
81 85
82 #endif // RUNTIME_VM_SERVICE_ISOLATE_H_ 86 #endif // RUNTIME_VM_SERVICE_ISOLATE_H_
OLDNEW
« 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