OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_DART_EMBEDDER_DART_CONTROLLER_H_ | 5 #ifndef MOJO_DART_EMBEDDER_DART_CONTROLLER_H_ |
6 #define MOJO_DART_EMBEDDER_DART_CONTROLLER_H_ | 6 #define MOJO_DART_EMBEDDER_DART_CONTROLLER_H_ |
7 | 7 |
8 #include "dart/runtime/include/dart_api.h" | 8 #include "dart/runtime/include/dart_api.h" |
9 #include "mojo/dart/embedder/isolate_data.h" | 9 #include "mojo/dart/embedder/isolate_data.h" |
10 #include "mojo/public/c/system/types.h" | 10 #include "mojo/public/c/system/types.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 // Start the handle watcher isolate. | 88 // Start the handle watcher isolate. |
89 static void StartHandleWatcherIsolate(); | 89 static void StartHandleWatcherIsolate(); |
90 // Stop the handle watcher isolate. | 90 // Stop the handle watcher isolate. |
91 static void StopHandleWatcherIsolate(); | 91 static void StopHandleWatcherIsolate(); |
92 | 92 |
93 // Dart API callback(s). | 93 // Dart API callback(s). |
94 static Dart_Isolate IsolateCreateCallback(const char* script_uri, | 94 static Dart_Isolate IsolateCreateCallback(const char* script_uri, |
95 const char* main, | 95 const char* main, |
96 const char* package_root, | 96 const char* package_root, |
| 97 Dart_IsolateFlags* flags, |
97 void* callback_data, | 98 void* callback_data, |
98 char** error); | 99 char** error); |
99 static void IsolateShutdownCallback(void* callback_data); | 100 static void IsolateShutdownCallback(void* callback_data); |
100 static void UnhandledExceptionCallback(Dart_Handle error); | 101 static void UnhandledExceptionCallback(Dart_Handle error); |
101 | 102 |
102 // Dart API callback helper(s). | 103 // Dart API callback helper(s). |
103 static Dart_Isolate CreateIsolateHelper(void* dart_app, | 104 static Dart_Isolate CreateIsolateHelper(void* dart_app, |
104 bool strict_compilation, | 105 bool strict_compilation, |
105 IsolateCallbacks callbacks, | 106 IsolateCallbacks callbacks, |
106 const std::string& script, | 107 const std::string& script, |
107 const std::string& script_uri, | 108 const std::string& script_uri, |
108 const std::string& package_root, | 109 const std::string& package_root, |
109 char** error); | 110 char** error); |
110 | 111 |
111 static void InitVmIfNeeded(Dart_EntropySource entropy, | 112 static void InitVmIfNeeded(Dart_EntropySource entropy, |
112 const char** arguments, | 113 const char** arguments, |
113 int arguments_count); | 114 int arguments_count); |
114 static bool initialized_; | 115 static bool initialized_; |
115 static bool strict_compilation_; | 116 static bool strict_compilation_; |
116 static bool service_isolate_running_; | 117 static bool service_isolate_running_; |
117 static DartControllerServiceConnector* service_connector_; | 118 static DartControllerServiceConnector* service_connector_; |
118 }; | 119 }; |
119 | 120 |
120 } // namespace dart | 121 } // namespace dart |
121 } // namespace mojo | 122 } // namespace mojo |
122 | 123 |
123 #endif // MOJO_DART_EMBEDDER_DART_CONTROLLER_H_ | 124 #endif // MOJO_DART_EMBEDDER_DART_CONTROLLER_H_ |
OLD | NEW |