Bug 1755481: correct documentation of `nsIClipboard::getData`. r=mccr8
[gecko.git] / xpcom / threads / nsIDelayedRunnableObserver.h
blobad4e6de51aaa7786b96e183e9cd6eefe4a8eb76f
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef XPCOM_THREADS_NSIDELAYEDRUNNABLEOBSERVER_H_
8 #define XPCOM_THREADS_NSIDELAYEDRUNNABLEOBSERVER_H_
10 #include "nsISupports.h"
12 namespace mozilla {
13 class DelayedRunnable;
16 #define NS_IDELAYEDRUNNABLEOBSERVER_IID \
17 { \
18 0xd226bade, 0xac13, 0x46fe, { \
19 0x9f, 0xcc, 0xde, 0xe7, 0x48, 0x35, 0xcd, 0x82 \
20 } \
23 class NS_NO_VTABLE nsIDelayedRunnableObserver : public nsISupports {
24 public:
25 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDELAYEDRUNNABLEOBSERVER_IID)
27 /**
28 * Called by the DelayedRunnable after being created, on the dispatching
29 * thread. This allows for various lifetime checks and gives assertions a
30 * chance to provide useful stack traces.
32 virtual void OnDelayedRunnableCreated(
33 mozilla::DelayedRunnable* aRunnable) = 0;
34 /**
35 * Called by the DelayedRunnable on its target thread when delegating the
36 * responsibility for being run to its underlying timer.
38 virtual void OnDelayedRunnableScheduled(
39 mozilla::DelayedRunnable* aRunnable) = 0;
40 /**
41 * Called by the DelayedRunnable on its target thread after having been run by
42 * its underlying timer.
44 virtual void OnDelayedRunnableRan(mozilla::DelayedRunnable* aRunnable) = 0;
47 NS_DEFINE_STATIC_IID_ACCESSOR(nsIDelayedRunnableObserver,
48 NS_IDELAYEDRUNNABLEOBSERVER_IID)
50 #endif