예제 #1
0
        /// <summary>
        /// Start tracing events on all processes. Tracing is initialized asynchronously
        /// and |callback| will be executed on the UI thread after initialization is
        /// complete.
        /// If CfxBeginTracing was called previously, or if a CfxEndTracingAsync call is
        /// pending, CfxBeginTracing will fail and return false (0).
        /// |categories| is a comma-delimited list of category wildcards. A category can
        /// have an optional '-' prefix to make it an excluded category. Having both
        /// included and excluded categories in the same list is not supported.
        /// Example: "test_MyTest*" Example: "test_MyTest*,test_OtherStuff" Example:
        /// "-excluded_category1,-excluded_category2"
        /// This function must be called on the browser process UI thread.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_trace_capi.h">cef/include/capi/cef_trace_capi.h</see>.
        /// </remarks>
        public static bool BeginTracing(string categories, CfxCompletionCallback callback)
        {
            var categories_pinned = new PinnedString(categories);
            var __retval          = CfxApi.cfx_begin_tracing(categories_pinned.Obj.PinnedPtr, categories_pinned.Length, CfxCompletionCallback.Unwrap(callback));

            categories_pinned.Obj.Free();
            return(0 != __retval);
        }