| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_DEBUGGER_H_ | 5 #ifndef MOJO_DART_EMBEDDER_DART_DEBUGGER_H_ |
| 6 #define MOJO_DART_EMBEDDER_DART_DEBUGGER_H_ | 6 #define MOJO_DART_EMBEDDER_DART_DEBUGGER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 #include <vector> |
| 10 |
| 8 #include "dart/runtime/include/dart_api.h" | 11 #include "dart/runtime/include/dart_api.h" |
| 9 #include "dart/runtime/include/dart_debugger_api.h" | 12 #include "dart/runtime/include/dart_debugger_api.h" |
| 10 #include "dart/runtime/include/dart_native_api.h" | 13 #include "dart/runtime/include/dart_native_api.h" |
| 11 #include "mojo/dart/embedder/monitor.h" | 14 #include "mojo/dart/embedder/monitor.h" |
| 12 | 15 |
| 13 namespace base { | 16 namespace base { |
| 14 class Lock; | 17 class Lock; |
| 15 } | 18 } |
| 16 | 19 |
| 17 namespace mojo { | 20 namespace mojo { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 56 |
| 54 static void ExceptionThrownHandler(Dart_IsolateId isolate_id, | 57 static void ExceptionThrownHandler(Dart_IsolateId isolate_id, |
| 55 Dart_Handle exception, | 58 Dart_Handle exception, |
| 56 Dart_StackTrace stack_trace); | 59 Dart_StackTrace stack_trace); |
| 57 | 60 |
| 58 static void IsolateEventHandler(Dart_IsolateId isolate_id, | 61 static void IsolateEventHandler(Dart_IsolateId isolate_id, |
| 59 Dart_IsolateEvent kind); | 62 Dart_IsolateEvent kind); |
| 60 | 63 |
| 61 static void NotifyIsolate(Dart_Isolate isolate); | 64 static void NotifyIsolate(Dart_Isolate isolate); |
| 62 | 65 |
| 63 static DartDebuggerIsolate* FindIsolateById(Dart_IsolateId id); | 66 static intptr_t FindIsolateIndexById(Dart_IsolateId id); |
| 64 | 67 |
| 65 static DartDebuggerIsolate* FindIsolateByIdLocked(Dart_IsolateId id); | 68 static intptr_t FindIsolateIndexByIdLocked(Dart_IsolateId id); |
| 66 | 69 |
| 67 static DartDebuggerIsolate* AddIsolate(Dart_IsolateId id); | 70 static void AddIsolate(Dart_IsolateId id); |
| 68 | 71 |
| 69 static void RemoveIsolate(Dart_IsolateId id); | 72 static void RemoveIsolate(Dart_IsolateId id); |
| 70 | 73 |
| 71 static base::Lock* lock_; | 74 static base::Lock* lock_; |
| 72 static std::vector<DartDebuggerIsolate*> isolates_; | 75 static std::vector<std::unique_ptr<DartDebuggerIsolate>>* isolates_; |
| 73 | 76 |
| 74 friend class DartDebuggerIsolate; | 77 friend class DartDebuggerIsolate; |
| 75 }; | 78 }; |
| 76 | 79 |
| 77 } // namespace dart | 80 } // namespace dart |
| 78 } // namespace mojo | 81 } // namespace mojo |
| 79 | 82 |
| 80 #endif // MOJO_DART_EMBEDDER_DART_DEBUGGER_H_ | 83 #endif // MOJO_DART_EMBEDDER_DART_DEBUGGER_H_ |
| OLD | NEW |