Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 interface nsIVisualEventTracerLog;
10 /**
11 * Interface to control the visual event tracer feature. The result
12 * is a log of various events that are monitored by a custom code
13 * instrumentation around the mozilla code base.
14 */
16 [builtinclass, scriptable, uuid(713ee3ca-95e0-4085-8616-f6d64a9508ad)]
17 interface nsIVisualEventTracer : nsISupports
18 {
19 /**
20 * Start the logging now. No affect if already started.
21 * Current backlog is deleted by this call otherwise.
22 *
23 * @param minBacklogSeconds
24 * Manimum time to keep the backlog. Entries of the log are discarded
25 * when their age is more then value of this argument.
26 */
27 void start(in unsigned long minBacklogSeconds);
29 /**
30 * Stop the logging now. Backlog is kept in memory.
31 */
32 void stop();
34 /**
35 * Obtain the log. This can be called whenever you want.
36 *
37 * @return
38 * Result is an object that keeps snaphot of the log from
39 * time this method has been called. You can then access
40 * the log using the object. Calling stop() on the tracer
41 * doesn't delete this log.
42 */
43 nsIVisualEventTracerLog snapshot();
44 };
46 [builtinclass, scriptable, uuid(8ec6e36d-6cba-400b-bcd6-454679f5f75a)]
47 interface nsIVisualEventTracerLog : nsISupports
48 {
49 /**
50 * JSON string of the log. Use JSON.parse to get it as an object.
51 */
52 readonly attribute ACString JSONString;
54 /**
55 * Write the JSON string returned by JSONString to the log defined by
56 * the environment variable MOZ_PROFILING_FILE.
57 */
58 void writeToProfilingFile();
59 };