1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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 file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file declares data structures used to communicate checkerboard reports
9 * from C++ code to about:checkerboard (see bug 1238042). These dictionaries
10 * are NOT exposed to standard web content.
13 enum CheckerboardReason {
18 // Individual checkerboard report. Contains fields for the severity of the
19 // checkerboard event, the timestamp at which it was reported, the detailed
20 // log of the event, and the reason this report was saved (currently either
21 // "severe" or "recent").
22 dictionary CheckerboardReport {
23 unsigned long severity;
24 DOMTimeStamp timestamp; // milliseconds since epoch
26 CheckerboardReason reason;
29 // The guard function only allows creation of this interface on the
30 // about:checkerboard page, and only if it's in the parent process.
31 [Func="mozilla::dom::CheckerboardReportService::IsEnabled",
33 interface CheckerboardReportService {
37 * Gets the available checkerboard reports.
39 sequence<CheckerboardReport> getReports();
42 * Gets the state of the apz.record_checkerboarding pref.
44 boolean isRecordingEnabled();
47 * Sets the state of the apz.record_checkerboarding pref.
49 undefined setRecordingEnabled(boolean aEnabled);
52 * Flush any in-progress checkerboard reports. Since this happens
53 * asynchronously, the caller may register an observer with the observer
54 * service to be notified when this operation is complete. The observer should
55 * listen for the topic "APZ:FlushActiveCheckerboard:Done". Upon receiving
56 * this notification, the caller may call getReports() to obtain the flushed
57 * reports, along with any other reports that are available.
59 undefined flushActiveReports();