Bug 1869043 allow a device to be specified with MediaTrackGraph::NotifyWhenDeviceStar...
[gecko.git] / layout / base / nsIReflowCallback.h
blobaa7dbd3c24e20a29900f73d9afcfd0aa5c09dd2f
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/. */
6 #ifndef nsIReflowCallback_h___
7 #define nsIReflowCallback_h___
9 /**
10 * Reflow callback interface.
11 * These are not refcounted. Objects must be removed from the presshell
12 * callback list before they die.
13 * Protocol: objects will either get a ReflowFinished() call when a reflow
14 * has finished or a ReflowCallbackCanceled() call if the shell is destroyed,
15 * whichever happens first. If the object is explicitly removed from the shell
16 * (using PresShell::CancelReflowCallback()) before that occurs then neither
17 * of the callback methods are called.
19 class nsIReflowCallback {
20 public:
21 /**
22 * The presshell calls this when reflow has finished. Return true if
23 * you need a FlushType::Layout to happen after this.
25 virtual bool ReflowFinished() = 0;
26 /**
27 * The presshell calls this on outstanding callback requests in its
28 * Destroy() method. The shell removes the request after calling
29 * ReflowCallbackCanceled().
31 virtual void ReflowCallbackCanceled() = 0;
34 #endif /* nsIReflowCallback_h___ */