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

Side by Side Diff: dart/runtime/bin/vmservice_impl.h

Issue 239303004: Extract common code, add host IP to --debug and --enable-vm-service options (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 8 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
« no previous file with comments | « dart/runtime/bin/vmservice/vmservice_io.dart ('k') | dart/runtime/bin/vmservice_impl.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 BIN_VMSERVICE_IMPL_H_ 5 #ifndef BIN_VMSERVICE_IMPL_H_
6 #define BIN_VMSERVICE_IMPL_H_ 6 #define BIN_VMSERVICE_IMPL_H_
7 7
8 #include "bin/vmservice.h" 8 #include "bin/vmservice.h"
9 #include "platform/thread.h" 9 #include "platform/thread.h"
10 10
11 11
12 namespace dart { 12 namespace dart {
13 namespace bin { 13 namespace bin {
14 14
15 class VmService { 15 class VmService {
16 public: 16 public:
17 // Returns false if service could not be started. 17 // Returns false if service could not be started.
18 static bool Start(intptr_t server_port); 18 static bool Start(const char *server_ip, intptr_t server_port);
19 // Error message if startup failed. 19 // Error message if startup failed.
20 static const char* GetErrorMessage(); 20 static const char* GetErrorMessage();
21 21
22 private: 22 private:
23 static bool _Start(intptr_t server_port); 23 static bool _Start(const char *server_ip, intptr_t server_port);
24 static Dart_Handle GetSource(const char* name); 24 static Dart_Handle GetSource(const char* name);
25 static Dart_Handle LoadScript(const char* name); 25 static Dart_Handle LoadScript(const char* name);
26 static Dart_Handle LoadSource(Dart_Handle library, const char* name); 26 static Dart_Handle LoadSource(Dart_Handle library, const char* name);
27 static Dart_Handle LoadResources(Dart_Handle library); 27 static Dart_Handle LoadResources(Dart_Handle library);
28 static Dart_Handle LoadResource(Dart_Handle library, const char* name, 28 static Dart_Handle LoadResource(Dart_Handle library, const char* name,
29 const char* prefix); 29 const char* prefix);
30 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, Dart_Handle library, 30 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, Dart_Handle library,
31 Dart_Handle url); 31 Dart_Handle url);
32 static void ThreadMain(uword parameters); 32 static void ThreadMain(uword parameters);
33 static const char* error_msg_; 33 static const char* error_msg_;
34 DISALLOW_ALLOCATION(); 34 DISALLOW_ALLOCATION();
35 DISALLOW_IMPLICIT_CONSTRUCTORS(VmService); 35 DISALLOW_IMPLICIT_CONSTRUCTORS(VmService);
36 }; 36 };
37 37
38 38
39 } // namespace bin 39 } // namespace bin
40 } // namespace dart 40 } // namespace dart
41 41
42 #endif // BIN_VMSERVICE_IMPL_H_ 42 #endif // BIN_VMSERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « dart/runtime/bin/vmservice/vmservice_io.dart ('k') | dart/runtime/bin/vmservice_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698