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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 VM_SERVICE_ISOLATE_H_
6 #define VM_SERVICE_ISOLATE_H_
7
8 #include "include/dart_api.h"
9
10 #include "vm/allocation.h"
11 #include "vm/os_thread.h"
12
13 namespace dart {
14
15 class ServiceIsolate : public AllStatic {
16 public:
17 static const char* kName;
18 static bool IsName(const char* name);
turnidge 2015/02/12 18:08:57 Maybe "NameEquals?"
Cutch 2015/02/12 18:18:47 Done.
19
20 static bool HasServiceIsolate();
turnidge 2015/02/12 18:08:57 ServiceIsolate::HasServiceIsolate is repetitive --
Cutch 2015/02/12 18:18:47 ServiceIsolate::Exists
21 static bool IsRunning();
22 static bool IsServiceIsolate(Isolate* isolate);
23 static Dart_Port Port();
24
25 static Dart_Port WaitForLoadPort();
26 static Dart_Port LoadPort();
27
28 static void Run();
29 static bool SendIsolateStartupMessage();
30 static bool SendIsolateShutdownMessage();
31
32 protected:
33 static void SetServicePort(Dart_Port port);
34 static void SetServiceIsolate(Isolate* isolate);
35 static void SetLoadPort(Dart_Port port);
36 static void FinishedInitializing();
37 static void MaybeInjectVMServiceLibrary(Isolate* isolate);
38 static Dart_IsolateCreateCallback create_callback() {
39 return create_callback_;
40 }
41
42 static Dart_Handle GetSource(const char* name);
43 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, Dart_Handle library,
44 Dart_Handle url);
45
46 static Dart_IsolateCreateCallback create_callback_;
47 static Monitor* monitor_;
48 static bool initializing_;
49 static Isolate* isolate_;
50 static Dart_Port port_;
51 static Dart_Port load_port_;
52
53 friend class Dart;
54 friend class RunServiceTask;
55 friend class ServiceIsolateNatives;
56 };
57
58 } // namespace dart
59
60 #endif // VM_SERVICE_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698