diff options
Diffstat (limited to 'runtime/runtime_callbacks.h')
-rw-r--r-- | runtime/runtime_callbacks.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/runtime_callbacks.h b/runtime/runtime_callbacks.h index c1ba9643a7..baf941a8e1 100644 --- a/runtime/runtime_callbacks.h +++ b/runtime/runtime_callbacks.h @@ -19,6 +19,7 @@ #include <vector> +#include "base/array_ref.h" #include "base/macros.h" #include "base/mutex.h" #include "dex_file.h" @@ -54,6 +55,13 @@ class ThreadLifecycleCallback; // any state checking (is the listener enabled) in the listener itself. For an example, see // Dbg. +class DdmCallback { + public: + virtual ~DdmCallback() {} + virtual void DdmPublishChunk(uint32_t type, const ArrayRef<const uint8_t>& data) + REQUIRES_SHARED(Locks::mutator_lock_) = 0; +}; + class RuntimeSigQuitCallback { public: virtual ~RuntimeSigQuitCallback() {} @@ -182,6 +190,13 @@ class RuntimeCallbacks { void RemoveMethodInspectionCallback(MethodInspectionCallback* cb) REQUIRES_SHARED(Locks::mutator_lock_); + // DDMS callbacks + void DdmPublishChunk(uint32_t type, const ArrayRef<const uint8_t>& data) + REQUIRES_SHARED(Locks::mutator_lock_); + + void AddDdmCallback(DdmCallback* cb) REQUIRES_SHARED(Locks::mutator_lock_); + void RemoveDdmCallback(DdmCallback* cb) REQUIRES_SHARED(Locks::mutator_lock_); + private: std::vector<ThreadLifecycleCallback*> thread_callbacks_ GUARDED_BY(Locks::mutator_lock_); @@ -197,6 +212,8 @@ class RuntimeCallbacks { GUARDED_BY(Locks::mutator_lock_); std::vector<MethodInspectionCallback*> method_inspection_callbacks_ GUARDED_BY(Locks::mutator_lock_); + std::vector<DdmCallback*> ddm_callbacks_ + GUARDED_BY(Locks::mutator_lock_); }; } // namespace art |