2014-10-27 20:00:05 +03:00
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
interface mozIDOMWindow;
|
2015-12-15 14:10:53 +03:00
|
|
|
interface nsIPrincipal;
|
2014-10-29 23:11:33 +03:00
|
|
|
|
2015-10-16 19:48:26 +03:00
|
|
|
[scriptable, uuid(9cf3b48e-361d-486a-8917-55cf8d00bb41)]
|
2014-10-29 23:11:33 +03:00
|
|
|
interface nsIWorkerDebuggerListener : nsISupports
|
|
|
|
{
|
|
|
|
void onClose();
|
2015-03-20 14:15:59 +03:00
|
|
|
|
2018-09-06 11:02:43 +03:00
|
|
|
void onError(in AString filename, in unsigned long lineno,
|
|
|
|
in AString message);
|
2015-03-26 22:09:45 +03:00
|
|
|
|
2018-09-06 11:02:43 +03:00
|
|
|
void onMessage(in AString message);
|
2014-10-29 23:11:33 +03:00
|
|
|
};
|
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
[scriptable, builtinclass, uuid(22f93aa3-8a05-46be-87e0-fa93bf8a8eff)]
|
2014-10-27 20:00:05 +03:00
|
|
|
interface nsIWorkerDebugger : nsISupports
|
|
|
|
{
|
2014-10-29 23:11:33 +03:00
|
|
|
const unsigned long TYPE_DEDICATED = 0;
|
|
|
|
const unsigned long TYPE_SHARED = 1;
|
|
|
|
const unsigned long TYPE_SERVICE = 2;
|
|
|
|
|
2014-10-27 20:00:05 +03:00
|
|
|
readonly attribute bool isClosed;
|
|
|
|
|
2014-10-29 23:11:33 +03:00
|
|
|
readonly attribute bool isChrome;
|
|
|
|
|
2015-06-08 10:08:20 +03:00
|
|
|
readonly attribute bool isInitialized;
|
|
|
|
|
2014-10-29 23:11:33 +03:00
|
|
|
readonly attribute nsIWorkerDebugger parent;
|
|
|
|
|
|
|
|
readonly attribute unsigned long type;
|
|
|
|
|
2018-09-06 11:02:43 +03:00
|
|
|
readonly attribute AString url;
|
2014-10-29 23:11:33 +03:00
|
|
|
|
2016-01-30 20:05:36 +03:00
|
|
|
readonly attribute mozIDOMWindow window;
|
2014-10-29 23:11:33 +03:00
|
|
|
|
2015-12-15 14:10:53 +03:00
|
|
|
readonly attribute nsIPrincipal principal;
|
|
|
|
|
|
|
|
readonly attribute unsigned long serviceWorkerID;
|
|
|
|
|
2019-04-18 03:47:24 +03:00
|
|
|
readonly attribute AString id;
|
|
|
|
|
2018-09-06 11:02:43 +03:00
|
|
|
void initialize(in AString url);
|
2015-03-17 13:15:19 +03:00
|
|
|
|
2016-02-26 23:23:12 +03:00
|
|
|
[binaryname(PostMessageMoz)]
|
2018-09-06 11:02:43 +03:00
|
|
|
void postMessage(in AString message);
|
2015-03-20 14:15:59 +03:00
|
|
|
|
2014-10-29 23:11:33 +03:00
|
|
|
void addListener(in nsIWorkerDebuggerListener listener);
|
|
|
|
|
|
|
|
void removeListener(in nsIWorkerDebuggerListener listener);
|
2019-02-13 02:04:18 +03:00
|
|
|
|
|
|
|
// Indicate whether the debugger has finished initializing. By default the
|
|
|
|
// debugger will be considered initialized when the onRegister hooks in all
|
|
|
|
// nsIWorkerDebuggerManagerListener have been called.
|
|
|
|
//
|
|
|
|
// setDebuggerReady(false) can be called during an onRegister hook to mark
|
|
|
|
// the debugger as not being ready yet. This will prevent all content from
|
|
|
|
// running in the worker, including the worker's main script and any messages
|
|
|
|
// posted to it. Other runnables will still execute in the worker as normal.
|
|
|
|
//
|
|
|
|
// When the debugger is ready, setDebuggerReady(true) should then be called
|
|
|
|
// to allow the worker to begin executing content.
|
|
|
|
void setDebuggerReady(in boolean ready);
|
2014-10-27 20:00:05 +03:00
|
|
|
};
|