OLD | NEW |
---|---|
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 RUNTIME_INCLUDE_DART_TOOLS_API_H_ | 5 #ifndef RUNTIME_INCLUDE_DART_TOOLS_API_H_ |
6 #define RUNTIME_INCLUDE_DART_TOOLS_API_H_ | 6 #define RUNTIME_INCLUDE_DART_TOOLS_API_H_ |
7 | 7 |
8 #include "dart_api.h" | 8 #include "dart_api.h" |
9 | 9 |
10 /** \mainpage Dart Tools Embedding API Reference | 10 /** \mainpage Dart Tools Embedding API Reference |
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
758 * \param user_data The user data passed to the callback. | 758 * \param user_data The user data passed to the callback. |
759 * | 759 * |
760 * NOTE: If multiple callbacks with the same name are registered, only | 760 * NOTE: If multiple callbacks with the same name are registered, only |
761 * the last callback registered will be remembered. | 761 * the last callback registered will be remembered. |
762 */ | 762 */ |
763 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( | 763 DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
764 const char* method, | 764 const char* method, |
765 Dart_ServiceRequestCallback callback, | 765 Dart_ServiceRequestCallback callback, |
766 void* user_data); | 766 void* user_data); |
767 | 767 |
768 /** | |
769 * Embedder information which can be requested by the VM for internal or | |
770 * reporting purposes. | |
771 * | |
772 * The pointers in this structure are not going to be cached or freed by the VM. | |
773 */ | |
774 | |
775 typedef struct { | |
zra
2017/08/10 22:19:50
This should probably have a version field. See for
cbernaschina
2017/08/12 00:29:42
Done.
| |
776 const char* name; // [optional] The name of the embedder | |
777 uintptr_t current_rss; // [optional] the current RSS of the embedder | |
778 uintptr_t max_rss; // [optional] the maximum RSS of the embedder | |
779 } Dart_EmbedderInformation; | |
780 | |
781 /** | |
782 * Callback provided by the embedder that is used by the vm to request | |
783 * information. | |
784 * | |
785 * \return Returns a pointer to a Dart_EmbedderInformation structure. | |
786 * The embedder keeps the ownership of the structure and any field in it. | |
787 * The embedder must ensure that the structure will remain valid until the | |
788 * next invokation of the callback. | |
789 */ | |
790 typedef const Dart_EmbedderInformation* (*Dart_GetEmbedderInformation)(); | |
zra
2017/08/10 22:19:50
Maybe Dart_GetEmbedderInformation -> Dart_Embedder
cbernaschina
2017/08/12 00:29:42
Done.
| |
791 | |
792 /** | |
793 * Register a Dart_ServiceRequestCallback to be called to handle | |
794 * requests for the named rpc. The callback will be invoked without a | |
795 * current isolate. | |
796 * | |
797 * \param method The name of the command that this callback is responsible for. | |
798 * \param callback The callback to invoke. | |
799 * \param user_data The user data passed to the callback. | |
800 * | |
801 * NOTE: If multiple callbacks with the same name are registered, only | |
802 * the last callback registered will be remembered. | |
803 */ | |
804 DART_EXPORT void Dart_SetGetEmbedderInformationCallback( | |
zra
2017/08/09 22:58:27
Consider a rename to avoid "SetGet", which doesn't
cbernaschina
2017/08/10 00:29:17
I called it SetGetEmbedderInformationCallback... f
zra
2017/08/10 22:19:50
Maybe just SetEmbedderInformationCallback?
cbernaschina
2017/08/12 00:29:42
Done.
| |
805 Dart_GetEmbedderInformation get_embedder_information); | |
806 | |
768 /* | 807 /* |
769 * ======== | 808 * ======== |
770 * Event Streams | 809 * Event Streams |
771 * ======== | 810 * ======== |
772 */ | 811 */ |
773 | 812 |
774 /** | 813 /** |
775 * A callback invoked when the VM service gets a request to listen to | 814 * A callback invoked when the VM service gets a request to listen to |
776 * some stream. | 815 * some stream. |
777 * | 816 * |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1020 * \param start_recording See Dart_EmbedderTimelineStartRecording. | 1059 * \param start_recording See Dart_EmbedderTimelineStartRecording. |
1021 * \param stop_recording See Dart_EmbedderTimelineStopRecording. | 1060 * \param stop_recording See Dart_EmbedderTimelineStopRecording. |
1022 * | 1061 * |
1023 * NOTE: To avoid races, this should be called before Dart_Initialize. | 1062 * NOTE: To avoid races, this should be called before Dart_Initialize. |
1024 */ | 1063 */ |
1025 DART_EXPORT void Dart_SetEmbedderTimelineCallbacks( | 1064 DART_EXPORT void Dart_SetEmbedderTimelineCallbacks( |
1026 Dart_EmbedderTimelineStartRecording start_recording, | 1065 Dart_EmbedderTimelineStartRecording start_recording, |
1027 Dart_EmbedderTimelineStopRecording stop_recording); | 1066 Dart_EmbedderTimelineStopRecording stop_recording); |
1028 | 1067 |
1029 #endif // RUNTIME_INCLUDE_DART_TOOLS_API_H_ | 1068 #endif // RUNTIME_INCLUDE_DART_TOOLS_API_H_ |
OLD | NEW |