Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj

This commit is contained in:
Kyle Huey 2016-04-25 17:23:21 -07:00
parent bd05429ff2
commit c73656947b
410 changed files with 800 additions and 866 deletions

View File

@ -1768,7 +1768,7 @@ Accessible::GetNativeInterface(void** aNativeAccessible)
void
Accessible::DoCommand(nsIContent *aContent, uint32_t aActionIndex)
{
class Runnable final : public nsRunnable
class Runnable final : public mozilla::Runnable
{
public:
Runnable(Accessible* aAcc, nsIContent* aContent, uint32_t aIdx) :

View File

@ -9461,7 +9461,7 @@ nsDocShell::CopyFavicon(nsIURI* aOldURI,
#endif
}
class InternalLoadEvent : public nsRunnable
class InternalLoadEvent : public Runnable
{
public:
InternalLoadEvent(nsDocShell* aDocShell, nsIURI* aURI,
@ -13524,7 +13524,7 @@ nsDocShell::SelectNone(void)
// link handling
class OnLinkClickEvent : public nsRunnable
class OnLinkClickEvent : public Runnable
{
public:
OnLinkClickEvent(nsDocShell* aHandler, nsIContent* aContent,

View File

@ -759,7 +759,7 @@ protected:
public:
// Event type dispatched by RestorePresentation
class RestorePresentationEvent : public nsRunnable
class RestorePresentationEvent : public mozilla::Runnable
{
public:
NS_DECL_NSIRUNNABLE

View File

@ -248,7 +248,7 @@ nsSHEntryShared::RemoveFromBFCacheSync()
return NS_OK;
}
class DestroyViewerEvent : public nsRunnable
class DestroyViewerEvent : public mozilla::Runnable
{
public:
DestroyViewerEvent(nsIContentViewer* aViewer, nsIDocument* aDocument)

View File

@ -49,7 +49,7 @@ protected:
* This class runs in a different thread and it calls the 'exec()' method.
* The exec() must populate mFileList and mStatus then it must call RunShare();
*/
class ArchiveReaderEvent : public nsRunnable
class ArchiveReaderEvent : public Runnable
{
public:
NS_DECL_NSIRUNNABLE

View File

@ -18,7 +18,7 @@ USING_ARCHIVEREADER_NAMESPACE
/**
* Class used to make asynchronous the ArchiveRequest.
*/
class ArchiveRequestEvent : public nsRunnable
class ArchiveRequestEvent : public Runnable
{
public:
NS_DECL_NSIRUNNABLE

View File

@ -238,7 +238,7 @@ EvictEntries(nsIFile* aDirectory, const nsACString& aGroup,
// FileDescriptorHolder owns a file descriptor and its memory mapping.
// FileDescriptorHolder is derived by two runnable classes (that is,
// (Parent|Child)Runnable.
class FileDescriptorHolder : public nsRunnable
class FileDescriptorHolder : public Runnable
{
public:
FileDescriptorHolder()

View File

@ -43,7 +43,7 @@ namespace {
bool sAudioChannelMutedByDefault = false;
bool sXPCOMShuttingDown = false;
class NotifyChannelActiveRunnable final : public nsRunnable
class NotifyChannelActiveRunnable final : public Runnable
{
public:
NotifyChannelActiveRunnable(uint64_t aWindowID, AudioChannel aAudioChannel,
@ -98,7 +98,7 @@ void
NotifyChannelActive(uint64_t aWindowID, AudioChannel aAudioChannel,
bool aActive)
{
RefPtr<nsRunnable> runnable =
RefPtr<Runnable> runnable =
new NotifyChannelActiveRunnable(aWindowID, aAudioChannel, aActive);
NS_DispatchToCurrentThread(runnable);
}
@ -109,7 +109,7 @@ IsParentProcess()
return XRE_GetProcessType() == GeckoProcessType_Default;
}
class MediaPlaybackRunnable : public nsRunnable
class MediaPlaybackRunnable : public Runnable
{
public:
MediaPlaybackRunnable(nsPIDOMWindowOuter* aWindow, bool aActive)

View File

@ -312,7 +312,7 @@ private:
JSContext* mCx;
};
class ConsoleRunnable : public nsRunnable
class ConsoleRunnable : public Runnable
, public WorkerFeature
, public StructuredCloneHolderBase
{

View File

@ -295,7 +295,7 @@ DOMRequestService::FireDetailedError(nsIDOMDOMRequest* aRequest,
return NS_OK;
}
class FireSuccessAsyncTask : public nsRunnable
class FireSuccessAsyncTask : public mozilla::Runnable
{
FireSuccessAsyncTask(DOMRequest* aRequest,
@ -332,7 +332,7 @@ private:
JS::PersistentRooted<JS::Value> mResult;
};
class FireErrorAsyncTask : public nsRunnable
class FireErrorAsyncTask : public mozilla::Runnable
{
public:
FireErrorAsyncTask(DOMRequest* aRequest,

View File

@ -1351,7 +1351,7 @@ private:
EventStates mState;
};
class RemoveFromBindingManagerRunnable : public nsRunnable
class RemoveFromBindingManagerRunnable : public mozilla::Runnable
{
public:
RemoveFromBindingManagerRunnable(nsBindingManager* aManager,

View File

@ -866,7 +866,7 @@ BlobImplFile::GetSize(ErrorResult& aRv)
namespace {
class GetTypeRunnable final : public nsRunnable
class GetTypeRunnable final : public Runnable
{
public:
GetTypeRunnable(WorkerPrivate* aWorkerPrivate,

View File

@ -1237,7 +1237,7 @@ FragmentOrElement::FireNodeInserted(nsIDocument* aDoc,
#define SUBTREE_UNBINDINGS_PER_RUNNABLE 500
class ContentUnbinder : public nsRunnable
class ContentUnbinder : public Runnable
{
public:
ContentUnbinder()

View File

@ -26,7 +26,7 @@ namespace dom {
// This class should be placed inside GetBRGADataSourceSurfaceSync(). However,
// due to B2G ICS uses old complier (C++98/03) which forbids local class as
// template parameter, we need to move this class outside.
class SurfaceHelper : public nsRunnable {
class SurfaceHelper : public Runnable {
public:
explicit SurfaceHelper(already_AddRefed<layers::Image> aImage) : mImage(aImage) {}
@ -135,7 +135,7 @@ private:
bool mFailed;
};
class EncodingRunnable : public nsRunnable
class EncodingRunnable : public Runnable
{
virtual ~EncodingRunnable() {}
@ -236,7 +236,7 @@ private:
bool mUsingCustomOptions;
};
NS_IMPL_ISUPPORTS_INHERITED0(EncodingRunnable, nsRunnable);
NS_IMPL_ISUPPORTS_INHERITED0(EncodingRunnable, Runnable);
StaticRefPtr<nsIThreadPool> ImageEncoder::sThreadPool;

View File

@ -378,7 +378,7 @@ ImportLoader::RemoveLinkElement(nsINode* aNode)
// be set on the link element before the load event is fired even
// if ImportLoader::Get returns an already loaded import and we
// fire the load event immediately on the new referring link element.
class AsyncEvent : public nsRunnable {
class AsyncEvent : public Runnable {
public:
AsyncEvent(nsINode* aNode, bool aSuccess)
: mNode(aNode)

View File

@ -24,7 +24,7 @@ namespace dom {
* Class used to represent events generated by calls to Window.postMessage,
* which asynchronously creates and dispatches events.
*/
class PostMessageEvent final : public nsRunnable
class PostMessageEvent final : public Runnable
, public StructuredCloneHolder
{
public:

View File

@ -389,7 +389,7 @@ WebSocketImpl::PrintErrorOnConsole(const char *aBundleURI,
namespace {
class CancelWebSocketRunnable final : public nsRunnable
class CancelWebSocketRunnable final : public Runnable
{
public:
CancelWebSocketRunnable(nsIWebSocketChannel* aChannel, uint16_t aReasonCode,
@ -437,7 +437,7 @@ private:
WebSocketImpl* mImpl;
};
class CloseConnectionRunnable final : public nsRunnable
class CloseConnectionRunnable final : public Runnable
{
public:
CloseConnectionRunnable(WebSocketImpl* aImpl,
@ -466,9 +466,9 @@ WebSocketImpl::CloseConnection(uint16_t aReasonCode,
const nsACString& aReasonString)
{
if (!IsTargetThread()) {
RefPtr<nsRunnable> runnable =
nsCOMPtr<nsIRunnable> runnable =
new CloseConnectionRunnable(this, aReasonCode, aReasonString);
return Dispatch(runnable, NS_DISPATCH_NORMAL);
return Dispatch(runnable.forget(), NS_DISPATCH_NORMAL);
}
AssertIsOnTargetThread();

View File

@ -4733,7 +4733,7 @@ nsContentUtils::IsInSameAnonymousTree(const nsINode* aNode,
return nodeAsContent->GetBindingParent() == aContent->GetBindingParent();
}
class AnonymousContentDestroyer : public nsRunnable {
class AnonymousContentDestroyer : public Runnable {
public:
explicit AnonymousContentDestroyer(nsCOMPtr<nsIContent>* aContent) {
mContent.swap(*aContent);

View File

@ -855,7 +855,7 @@ nsDOMMutationObserver::HandleMutation()
mCallback->Call(this, mutations, *this);
}
class AsyncMutationHandler : public nsRunnable
class AsyncMutationHandler : public mozilla::Runnable
{
public:
NS_IMETHOD Run()

View File

@ -14,7 +14,7 @@
#include "nsCOMPtr.h"
#include "nsIDocument.h"
class nsDocElementCreatedNotificationRunner : public nsRunnable
class nsDocElementCreatedNotificationRunner : public mozilla::Runnable
{
public:
explicit nsDocElementCreatedNotificationRunner(nsIDocument* aDoc)

View File

@ -1360,7 +1360,7 @@ void nsIDocument::SelectorCache::CacheList(const nsAString& aSelector,
AddObject(key);
}
class nsIDocument::SelectorCacheKeyDeleter final : public nsRunnable
class nsIDocument::SelectorCacheKeyDeleter final : public Runnable
{
public:
explicit SelectorCacheKeyDeleter(SelectorCacheKey* aToDelete)
@ -9147,7 +9147,7 @@ nsDocument::UnblockOnload(bool aFireSync)
}
}
class nsUnblockOnloadEvent : public nsRunnable {
class nsUnblockOnloadEvent : public Runnable {
public:
explicit nsUnblockOnloadEvent(nsDocument* aDoc) : mDoc(aDoc) {}
NS_IMETHOD Run() {
@ -10021,7 +10021,7 @@ nsDocument::LoadChromeSheetSync(nsIURI* uri, bool isAgentSheet,
return CSSLoader()->LoadSheetSync(uri, mode, isAgentSheet, aSheet);
}
class nsDelayedEventDispatcher : public nsRunnable
class nsDelayedEventDispatcher : public Runnable
{
public:
explicit nsDelayedEventDispatcher(nsTArray<nsCOMPtr<nsIDocument>>& aDocuments)
@ -11210,7 +11210,7 @@ AskWindowToExitFullscreen(nsIDocument* aDoc)
}
}
class nsCallExitFullscreen : public nsRunnable
class nsCallExitFullscreen : public Runnable
{
public:
explicit nsCallExitFullscreen(nsIDocument* aDoc)
@ -11284,7 +11284,7 @@ ResetFullScreen(nsIDocument* aDocument, void* aData)
// Since nsIDocument::ExitFullscreenInDocTree() could be called from
// Element::UnbindFromTree() where it is not safe to synchronously run
// script. This runnable is the script part of that function.
class ExitFullscreenScriptRunnable : public nsRunnable
class ExitFullscreenScriptRunnable : public Runnable
{
public:
explicit ExitFullscreenScriptRunnable(nsCOMArray<nsIDocument>&& aDocuments)
@ -11478,7 +11478,7 @@ nsDocument::RestorePreviousFullScreenState()
}
}
class nsCallRequestFullScreen : public nsRunnable
class nsCallRequestFullScreen : public Runnable
{
public:
explicit nsCallRequestFullScreen(UniquePtr<FullscreenRequest>&& aRequest)
@ -11725,8 +11725,8 @@ GetFullscreenError(nsIDocument* aDoc, bool aCallerIsChrome)
if (nsContentUtils::IsFullScreenApiEnabled() && aCallerIsChrome) {
// Chrome code can always use the full-screen API, provided it's not
// explicitly disabled. Note IsCallerChrome() returns true when running
// in an nsRunnable, so don't use GetMozFullScreenEnabled() from an
// nsRunnable!
// in a Runnable, so don't use GetMozFullScreenEnabled() from a
// Runnable!
return nullptr;
}
@ -12251,7 +12251,7 @@ static const uint8_t kPointerLockRequestLimit = 2;
class nsPointerLockPermissionRequest;
mozilla::StaticRefPtr<nsPointerLockPermissionRequest> gPendingPointerLockRequest;
class nsPointerLockPermissionRequest : public nsRunnable,
class nsPointerLockPermissionRequest : public Runnable,
public nsIContentPermissionRequest
{
public:
@ -12326,7 +12326,7 @@ protected:
};
NS_IMPL_ISUPPORTS_INHERITED(nsPointerLockPermissionRequest,
nsRunnable,
Runnable,
nsIContentPermissionRequest)
NS_IMETHODIMP

View File

@ -1958,7 +1958,7 @@ nsFocusManager::Focus(nsPIDOMWindowOuter* aWindow,
mFirstFocusEvent = nullptr;
}
class FocusBlurEvent : public nsRunnable
class FocusBlurEvent : public Runnable
{
public:
FocusBlurEvent(nsISupports* aTarget, EventMessage aEventMessage,
@ -3453,7 +3453,7 @@ nsFocusManager::GetFocusInSelection(nsPIDOMWindowOuter* aWindow,
while (selectionNode && selectionNode != endSelectionNode);
}
class PointerUnlocker : public nsRunnable
class PointerUnlocker : public Runnable
{
public:
PointerUnlocker()

View File

@ -1405,7 +1405,7 @@ nsFrameLoader::Destroy()
return NS_OK;
}
class nsFrameLoaderDestroyRunnable : public nsRunnable
class nsFrameLoaderDestroyRunnable : public Runnable
{
enum DestroyPhase
{
@ -2581,7 +2581,7 @@ nsFrameLoader::DoLoadMessageManagerScript(const nsAString& aURL, bool aRunInGlob
}
class nsAsyncMessageToChild : public nsSameProcessAsyncMessageBase,
public nsRunnable
public Runnable
{
public:
nsAsyncMessageToChild(JSContext* aCx, JS::Handle<JSObject*> aCpows, nsFrameLoader* aFrameLoader)

View File

@ -1890,7 +1890,7 @@ nsFrameMessageManager* nsFrameMessageManager::sParentProcessManager = nullptr;
nsFrameMessageManager* nsFrameMessageManager::sSameProcessParentManager = nullptr;
class nsAsyncMessageToSameProcessChild : public nsSameProcessAsyncMessageBase,
public nsRunnable
public Runnable
{
public:
nsAsyncMessageToSameProcessChild(JSContext* aCx, JS::Handle<JSObject*> aCpows)

View File

@ -317,7 +317,7 @@ private:
/* A helper class for taking care of many details for async message sending
within a single process. Intended to be used like so:
class MyAsyncMessage : public nsSameProcessAsyncMessageBase, public nsRunnable
class MyAsyncMessage : public nsSameProcessAsyncMessageBase, public Runnable
{
NS_IMETHOD Run() {
ReceiveMessage(..., ...);

View File

@ -5912,7 +5912,7 @@ GetFullscreenTransitionDuration(bool aEnterFullscreen,
}
}
class FullscreenTransitionTask : public nsRunnable
class FullscreenTransitionTask : public Runnable
{
public:
FullscreenTransitionTask(const FullscreenTransitionDuration& aDuration,
@ -8148,7 +8148,7 @@ nsGlobalWindow::PostMessageMoz(JSContext* aCx, JS::Handle<JS::Value> aMessage,
PostMessageMoz(aCx, aMessage, aTargetOrigin, transferArray, aError);
}
class nsCloseEvent : public nsRunnable {
class nsCloseEvent : public Runnable {
RefPtr<nsGlobalWindow> mWindow;
bool mIndirect;
@ -8529,7 +8529,7 @@ nsGlobalWindow::RunPendingTimeoutsRecursive(nsGlobalWindow *aTopWindow,
}
}
class nsPendingTimeoutRunner : public nsRunnable
class nsPendingTimeoutRunner : public Runnable
{
public:
explicit nsPendingTimeoutRunner(nsGlobalWindow* aWindow)
@ -8629,7 +8629,7 @@ struct BrowserCompartmentMatcher : public js::CompartmentFilter {
};
class WindowDestroyedEvent : public nsRunnable
class WindowDestroyedEvent : public Runnable
{
public:
WindowDestroyedEvent(nsIDOMWindow* aWindow, uint64_t aID,
@ -9060,7 +9060,7 @@ nsGlobalWindow::ShowModalDialog(JSContext* aCx, const nsAString& aUrl,
}
}
class ChildCommandDispatcher : public nsRunnable
class ChildCommandDispatcher : public Runnable
{
public:
ChildCommandDispatcher(nsGlobalWindow* aWindow,
@ -9090,7 +9090,7 @@ private:
nsString mAction;
};
class CommandDispatcher : public nsRunnable
class CommandDispatcher : public Runnable
{
public:
CommandDispatcher(nsIDOMXULCommandDispatcher* aDispatcher,
@ -9890,7 +9890,7 @@ nsGlobalWindow::PageHidden()
mNeedsFocus = true;
}
class HashchangeCallback : public nsRunnable
class HashchangeCallback : public Runnable
{
public:
HashchangeCallback(const nsAString &aOldURL,
@ -10497,7 +10497,7 @@ nsGlobalWindow::FireOfflineStatusEventIfChanged()
nsContentUtils::DispatchTrustedEvent(mDoc, eventTarget, name, true, false);
}
class NotifyIdleObserverRunnable : public nsRunnable
class NotifyIdleObserverRunnable : public Runnable
{
public:
NotifyIdleObserverRunnable(nsIIdleObserver* aIdleObserver,

View File

@ -39,7 +39,7 @@ nsIGlobalObject::UnregisterHostObjectURI(const nsACString& aURI)
namespace {
class UnlinkHostObjectURIsRunnable final : public nsRunnable
class UnlinkHostObjectURIsRunnable final : public mozilla::Runnable
{
public:
explicit UnlinkHostObjectURIsRunnable(nsTArray<nsCString>& aURIs)

View File

@ -304,7 +304,7 @@ nsInProcessTabChildGlobal::InitTabChildGlobal()
return NS_OK;
}
class nsAsyncScriptLoad : public nsRunnable
class nsAsyncScriptLoad : public Runnable
{
public:
nsAsyncScriptLoad(nsInProcessTabChildGlobal* aTabChild, const nsAString& aURL,

View File

@ -419,7 +419,7 @@ NS_HandleScriptError(nsIScriptGlobalObject *aScriptGlobal,
return called;
}
class ScriptErrorEvent : public nsRunnable
class ScriptErrorEvent : public Runnable
{
public:
ScriptErrorEvent(nsPIDOMWindowInner* aWindow,
@ -2180,7 +2180,7 @@ nsJSContext::KillICCTimer()
}
}
class NotifyGCEndRunnable : public nsRunnable
class NotifyGCEndRunnable : public Runnable
{
nsString mMessage;

View File

@ -186,7 +186,7 @@ nsScriptNameSpaceManager* GetNameSpaceManager();
nsScriptNameSpaceManager* PeekNameSpaceManager();
// Runnable that's used to do async error reporting
class AsyncErrorReporter final : public nsRunnable
class AsyncErrorReporter final : public mozilla::Runnable
{
public:
// aWindow may be null if this error report is not associated with a window

View File

@ -140,7 +140,7 @@ InActiveDocument(nsIContent *aContent)
/// Runnables and helper classes
///
class nsAsyncInstantiateEvent : public nsRunnable {
class nsAsyncInstantiateEvent : public Runnable {
public:
explicit nsAsyncInstantiateEvent(nsObjectLoadingContent* aContent)
: mContent(aContent) {}
@ -173,7 +173,7 @@ nsAsyncInstantiateEvent::Run()
// (outside an active document) or stopped (in a document but unrendered). This
// is used to allow scripts to move a plugin around the document hierarchy
// without re-instantiating it.
class CheckPluginStopEvent : public nsRunnable {
class CheckPluginStopEvent : public Runnable {
public:
explicit CheckPluginStopEvent(nsObjectLoadingContent* aContent)
: mContent(aContent) {}
@ -248,7 +248,7 @@ CheckPluginStopEvent::Run()
/**
* Helper task for firing simple events
*/
class nsSimplePluginEvent : public nsRunnable {
class nsSimplePluginEvent : public Runnable {
public:
nsSimplePluginEvent(nsIContent* aTarget, const nsAString &aEvent)
: mTarget(aTarget)
@ -301,7 +301,7 @@ nsSimplePluginEvent::Run()
/**
* A task for firing PluginCrashed DOM Events.
*/
class nsPluginCrashedEvent : public nsRunnable {
class nsPluginCrashedEvent : public Runnable {
public:
nsCOMPtr<nsIContent> mContent;
nsString mPluginDumpID;
@ -360,7 +360,7 @@ nsPluginCrashedEvent::Run()
return NS_OK;
}
class nsStopPluginRunnable : public nsRunnable, public nsITimerCallback
class nsStopPluginRunnable : public Runnable, public nsITimerCallback
{
public:
NS_DECL_ISUPPORTS_INHERITED
@ -374,7 +374,7 @@ public:
NS_ASSERTION(aContent, "need a nsObjectLoadingContent");
}
// nsRunnable
// Runnable
NS_IMETHOD Run() override;
// nsITimerCallback
@ -389,7 +389,7 @@ private:
nsCOMPtr<nsIObjectLoadingContent> mContent;
};
NS_IMPL_ISUPPORTS_INHERITED(nsStopPluginRunnable, nsRunnable, nsITimerCallback)
NS_IMPL_ISUPPORTS_INHERITED(nsStopPluginRunnable, Runnable, nsITimerCallback)
NS_IMETHODIMP
nsStopPluginRunnable::Notify(nsITimer *aTimer)

View File

@ -215,7 +215,7 @@ nsReferencedElement::Observe(Element* aOldElement,
}
NS_IMPL_ISUPPORTS_INHERITED0(nsReferencedElement::ChangeNotification,
nsRunnable)
mozilla::Runnable)
NS_IMPL_ISUPPORTS(nsReferencedElement::DocumentLoadNotification,
nsIObserver)

View File

@ -123,7 +123,7 @@ private:
nsReferencedElement* mTarget;
};
class ChangeNotification : public nsRunnable,
class ChangeNotification : public mozilla::Runnable,
public Notification
{
public:

View File

@ -373,7 +373,7 @@ nsScriptLoader::PreloadURIComparator::Equals(const PreloadInfo &aPi,
same;
}
class nsScriptRequestProcessor : public nsRunnable
class nsScriptRequestProcessor : public Runnable
{
private:
RefPtr<nsScriptLoader> mLoader;
@ -728,7 +728,7 @@ nsScriptLoader::ProcessScriptElement(nsIScriptElement *aElement)
namespace {
class NotifyOffThreadScriptLoadCompletedRunnable : public nsRunnable
class NotifyOffThreadScriptLoadCompletedRunnable : public Runnable
{
RefPtr<nsScriptLoadRequest> mRequest;
RefPtr<nsScriptLoader> mLoader;

View File

@ -151,7 +151,7 @@ using namespace mozilla::dom;
NS_IMPL_ISUPPORTS(nsXHRParseEndListener, nsIDOMEventListener)
class nsResumeTimeoutsEvent : public nsRunnable
class nsResumeTimeoutsEvent : public Runnable
{
public:
explicit nsResumeTimeoutsEvent(nsPIDOMWindowInner* aWindow) : mWindow(aWindow) {}

View File

@ -171,7 +171,7 @@ BrowserElementAudioChannel::Name() const
namespace {
class BaseRunnable : public nsRunnable
class BaseRunnable : public Runnable
{
protected:
nsCOMPtr<nsPIDOMWindowInner> mParentWindow;

View File

@ -22,7 +22,7 @@ namespace cache {
class ManagerId;
class PrincipalVerifier final : public nsRunnable
class PrincipalVerifier final : public Runnable
{
public:
// An interface to be implemented by code wishing to use the

View File

@ -26,7 +26,7 @@ CameraControlImpl::CameraControlImpl()
DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
mCurrentConfiguration.mMode = ICameraControl::kUnspecifiedMode;
class Delegate : public nsRunnable
class Delegate : public Runnable
{
public:
NS_IMETHOD
@ -329,7 +329,7 @@ CameraControlImpl::OnSystemError(CameraControlListener::SystemContext aContext,
// Camera control asynchronous message; these are dispatched from
// the Main Thread to the Camera Thread, where they are consumed.
class CameraControlImpl::ControlMessage : public nsRunnable
class CameraControlImpl::ControlMessage : public Runnable
{
public:
ControlMessage(CameraControlImpl* aCameraControl,

View File

@ -22,7 +22,7 @@ namespace dom {
* CameraClosedListenerProxy and CameraClosedMessage
*/
template<class T>
class CameraClosedMessage : public nsRunnable
class CameraClosedMessage : public Runnable
{
public:
explicit CameraClosedMessage(nsMainThreadPtrHandle<T> aListener)

View File

@ -30,7 +30,7 @@ DOMCameraControlListener::~DOMCameraControlListener()
}
// Boilerplate callback runnable
class DOMCameraControlListener::DOMCallback : public nsRunnable
class DOMCameraControlListener::DOMCallback : public Runnable
{
public:
explicit DOMCallback(nsMainThreadPtrHandle<nsISupports> aDOMCameraControl)

View File

@ -968,7 +968,7 @@ nsGonkCameraControl::GetCameraHw()
nsresult
nsGonkCameraControl::SetThumbnailSize(const Size& aSize)
{
class SetThumbnailSize : public nsRunnable
class SetThumbnailSize : public Runnable
{
public:
SetThumbnailSize(nsGonkCameraControl* aCameraControl, const Size& aSize)
@ -1086,7 +1086,7 @@ nsGonkCameraControl::RationalizeRotation(int32_t aRotation)
nsresult
nsGonkCameraControl::SetPictureSize(const Size& aSize)
{
class SetPictureSize : public nsRunnable
class SetPictureSize : public Runnable
{
public:
SetPictureSize(nsGonkCameraControl* aCameraControl, const Size& aSize)
@ -1288,7 +1288,7 @@ nsGonkCameraControl::StartRecordingImpl(DeviceStorageFileDescriptor* aFileDescri
nsresult
nsGonkCameraControl::StopRecordingImpl()
{
class RecordingComplete : public nsRunnable
class RecordingComplete : public Runnable
{
public:
RecordingComplete(already_AddRefed<DeviceStorageFile> aFile)
@ -1472,7 +1472,7 @@ nsGonkCameraControl::OnAutoFocusMoving(bool aIsMoving)
void
nsGonkCameraControl::OnAutoFocusComplete(bool aSuccess, bool aExpired)
{
class AutoFocusComplete : public nsRunnable
class AutoFocusComplete : public Runnable
{
public:
AutoFocusComplete(nsGonkCameraControl* aCameraControl, bool aSuccess, bool aExpired)
@ -2247,7 +2247,7 @@ nsGonkCameraControl::OnRateLimitPreview(bool aLimit)
void
nsGonkCameraControl::CreatePoster(Image* aImage, uint32_t aWidth, uint32_t aHeight, int32_t aRotation)
{
class PosterRunnable : public nsRunnable {
class PosterRunnable : public Runnable {
public:
PosterRunnable(nsGonkCameraControl* aTarget, Image* aImage,
uint32_t aWidth, uint32_t aHeight, int32_t aRotation)

View File

@ -913,7 +913,7 @@ private:
RefPtr<ImageBitmap> mImageBitmap;
};
class FulfillImageBitmapPromiseTask final : public nsRunnable,
class FulfillImageBitmapPromiseTask final : public Runnable,
public FulfillImageBitmapPromise
{
public:
@ -1103,7 +1103,7 @@ protected:
Maybe<IntRect> mCropRect;
};
class CreateImageBitmapFromBlobTask final : public nsRunnable,
class CreateImageBitmapFromBlobTask final : public Runnable,
public CreateImageBitmapFromBlob
{
public:

View File

@ -23,7 +23,7 @@ class WebGLQuery final
public:
explicit WebGLQuery(WebGLContext* webgl);
class AvailableRunnable final : public nsRunnable
class AvailableRunnable final : public Runnable
{
public:
explicit AvailableRunnable(WebGLQuery* query) : mQuery(query) { }

View File

@ -41,7 +41,8 @@ private:
NS_DECL_OWNINGTHREAD
DeviceStorageParams mParams;
class CancelableRunnable : public nsRunnable
// XXXkhuey name collision :(
class CancelableRunnable : public Runnable
{
public:
explicit CancelableRunnable(DeviceStorageRequestParent* aParent)

View File

@ -487,7 +487,7 @@ DeviceStorageTypeChecker::IsSharedMediaRoot(const nsAString& aType)
#endif
}
class IOEventComplete : public nsRunnable
class IOEventComplete : public Runnable
{
public:
IOEventComplete(DeviceStorageFile *aFile, const char *aType)

View File

@ -100,7 +100,7 @@ public:
~DeviceStorageUsedSpaceCache();
class InvalidateRunnable final : public nsRunnable
class InvalidateRunnable final : public mozilla::Runnable
{
public:
InvalidateRunnable(DeviceStorageUsedSpaceCache* aCache,
@ -304,7 +304,7 @@ private:
};
class DeviceStorageRequest
: public nsRunnable
: public mozilla::Runnable
{
protected:
DeviceStorageRequest();

View File

@ -195,7 +195,7 @@ private:
* Helper classes to notify IME.
*/
class AChangeEvent: public nsRunnable
class AChangeEvent: public Runnable
{
protected:
enum ChangeEventType

View File

@ -890,7 +890,7 @@ IMEStateManager::GetNewIMEState(nsPresContext* aPresContext,
}
// Helper class, used for IME enabled state change notification
class IMEEnabledStateChangedEvent : public nsRunnable {
class IMEEnabledStateChangedEvent : public Runnable {
public:
explicit IMEEnabledStateChangedEvent(uint32_t aState)
: mState(aState)

View File

@ -380,7 +380,7 @@ private:
* CompositionEventDispatcher dispatches the specified composition (or text)
* event.
*/
class CompositionEventDispatcher : public nsRunnable
class CompositionEventDispatcher : public Runnable
{
public:
CompositionEventDispatcher(TextComposition* aTextComposition,

View File

@ -106,7 +106,7 @@ private:
~MainThreadFetchResolver();
};
class MainThreadFetchRunnable : public nsRunnable
class MainThreadFetchRunnable : public Runnable
{
RefPtr<WorkerFetchResolver> mResolver;
RefPtr<InternalRequest> mRequest;
@ -696,7 +696,7 @@ NS_INTERFACE_MAP_BEGIN(ConsumeBodyDoneObserver<Derived>)
NS_INTERFACE_MAP_END
template <class Derived>
class BeginConsumeBodyRunnable final : public nsRunnable
class BeginConsumeBodyRunnable final : public Runnable
{
FetchBody<Derived>* mFetchBody;
public:

View File

@ -61,7 +61,7 @@ const uint32_t kStreamCopyBlockSize = 32768;
} // namespace
class FileHandleThreadPool::FileHandleQueue final
: public nsRunnable
: public Runnable
{
friend class FileHandleThreadPool;
@ -570,7 +570,7 @@ protected:
};
class CopyFileHandleOp::ProgressRunnable final
: public nsRunnable
: public Runnable
{
RefPtr<CopyFileHandleOp> mCopyFileHandleOp;
uint64_t mProgress;

View File

@ -207,7 +207,7 @@ private:
// This class is the 'alter ego' of FileSystemTaskChildBase in the PBackground
// world.
class FileSystemTaskParentBase : public nsRunnable
class FileSystemTaskParentBase : public Runnable
{
public:
/*

View File

@ -223,7 +223,7 @@ public:
NS_IMPL_ISUPPORTS(GeolocationSettingsCallback, nsISettingsServiceCallback)
class RequestPromptEvent : public nsRunnable
class RequestPromptEvent : public Runnable
{
public:
RequestPromptEvent(nsGeolocationRequest* aRequest, nsWeakPtr aWindow)
@ -244,7 +244,7 @@ private:
nsWeakPtr mWindow;
};
class RequestAllowEvent : public nsRunnable
class RequestAllowEvent : public Runnable
{
public:
RequestAllowEvent(int allow, nsGeolocationRequest* request)
@ -267,7 +267,7 @@ private:
RefPtr<nsGeolocationRequest> mRequest;
};
class RequestSendLocationEvent : public nsRunnable
class RequestSendLocationEvent : public Runnable
{
public:
RequestSendLocationEvent(nsIDOMGeoPosition* aPosition,

View File

@ -436,7 +436,7 @@ protected:
class RemoveElementRunnable;
friend class RemoveElementRunnable;
class RemoveElementRunnable : public nsRunnable {
class RemoveElementRunnable : public Runnable {
public:
explicit RemoveElementRunnable(HTMLFormElement* aForm)
: mForm(aForm)

View File

@ -77,7 +77,7 @@ namespace dom {
// Calls LoadSelectedImage on host element unless it has been superseded or
// canceled -- this is the synchronous section of "update the image data".
// https://html.spec.whatwg.org/multipage/embedded-content.html#update-the-image-data
class ImageLoadTask : public nsRunnable
class ImageLoadTask : public Runnable
{
public:
ImageLoadTask(HTMLImageElement *aElement, bool aAlwaysLoad)

View File

@ -207,7 +207,7 @@ static const double THRESHOLD_LOW_PLAYBACKRATE_AUDIO = 0.5;
// receive events. If we neglect to remove the self-reference then the element
// just lives longer than it needs to.
class nsMediaEvent : public nsRunnable
class nsMediaEvent : public Runnable
{
public:

View File

@ -122,7 +122,7 @@ static nsIWidget* GetWidget(Element* aElement)
Element* HTMLObjectElement::sLastFocused = nullptr; // Weak
class PluginFocusSetter : public nsRunnable
class PluginFocusSetter : public Runnable
{
public:
PluginFocusSetter(nsIWidget* aWidget, Element* aElement)

View File

@ -118,7 +118,7 @@ using namespace mozilla::dom;
* nsGenericHTMLFormElement is binded to the tree with the autofocus attribute
* enabled.
*/
class nsAutoFocusEvent : public nsRunnable
class nsAutoFocusEvent : public Runnable
{
public:
explicit nsAutoFocusEvent(nsGenericHTMLFormElement* aElement) : mElement(aElement) {}

View File

@ -2524,7 +2524,7 @@ nsHTMLDocument::EndUpdate(nsUpdateType aUpdateType)
// Helper class, used below in ChangeContentEditableCount().
class DeferredContentEditableCountChangeEvent : public nsRunnable
class DeferredContentEditableCountChangeEvent : public Runnable
{
public:
DeferredContentEditableCountChangeEvent(nsHTMLDocument *aDoc,

View File

@ -83,7 +83,7 @@ private:
bool mOuterTransaction;
};
class RestoreSelectionState : public nsRunnable {
class RestoreSelectionState : public Runnable {
public:
RestoreSelectionState(nsTextEditorState *aState, nsTextControlFrame *aFrame)
: mFrame(aFrame),
@ -1087,7 +1087,7 @@ nsTextEditorState::GetSelectionController() const
}
// Helper class, used below in BindToFrame().
class PrepareEditorEvent : public nsRunnable {
class PrepareEditorEvent : public Runnable {
public:
PrepareEditorEvent(nsTextEditorState &aState,
nsIContent *aOwnerContent,

View File

@ -898,7 +898,7 @@ protected:
Recv__delete__(const uint32_t& aPermission) override;
};
class WorkerPermissionChallenge final : public nsRunnable
class WorkerPermissionChallenge final : public Runnable
, public WorkerFeature
{
public:

View File

@ -5364,7 +5364,7 @@ private:
};
class ConnectionPool::ConnectionRunnable
: public nsRunnable
: public Runnable
{
protected:
DatabaseInfo* mDatabaseInfo;
@ -5512,7 +5512,7 @@ protected:
};
class ConnectionPool::FinishCallbackWrapper final
: public nsRunnable
: public Runnable
{
RefPtr<ConnectionPool> mConnectionPool;
RefPtr<FinishCallback> mCallback;
@ -5605,7 +5605,7 @@ public:
};
class ConnectionPool::ThreadRunnable final
: public nsRunnable
: public Runnable
{
// Only touched on the background thread.
static uint32_t sNextSerialNumber;
@ -5690,7 +5690,7 @@ private:
******************************************************************************/
class DatabaseOperationBase
: public nsRunnable
: public Runnable
, public mozIStorageProgressHandler
{
friend class UpgradeFileIdsFunction;
@ -6079,7 +6079,7 @@ private:
};
class WaitForTransactionsHelper final
: public nsRunnable
: public Runnable
{
nsCOMPtr<nsIEventTarget> mOwningThread;
const nsCString mDatabaseId;
@ -8537,7 +8537,7 @@ private:
};
class GetFileReferencesHelper final
: public nsRunnable
: public Runnable
{
PersistenceType mPersistenceType;
nsCString mOrigin;
@ -8583,7 +8583,7 @@ private:
};
class FlushPendingFileDeletionsRunnable final
: public nsRunnable
: public Runnable
{
private:
~FlushPendingFileDeletionsRunnable()
@ -8912,7 +8912,7 @@ private:
};
class Maintenance final
: public nsRunnable
: public Runnable
, public OpenDirectoryListener
{
struct DirectoryInfo;
@ -9140,7 +9140,7 @@ struct Maintenance::DirectoryInfo final
};
class DatabaseMaintenance final
: public nsRunnable
: public Runnable
{
// The minimum amount of time that has passed since the last vacuum before we
// will attempt to analyze the database for fragmentation.
@ -11929,7 +11929,7 @@ ConnectionPool::ScheduleTransaction(TransactionInfo* aTransactionInfo,
// We need a thread right now so force all idle processing to stop by
// posting a dummy runnable to each thread that might be doing idle
// maintenance.
nsCOMPtr<nsIRunnable> runnable = new nsRunnable();
nsCOMPtr<nsIRunnable> runnable = new Runnable();
for (uint32_t index = mDatabasesPerformingIdleMaintenance.Length();
index > 0;
@ -12562,7 +12562,7 @@ FinishCallbackWrapper::~FinishCallbackWrapper()
MOZ_ASSERT(!mCallback);
}
NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::FinishCallbackWrapper, nsRunnable)
NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::FinishCallbackWrapper, Runnable)
nsresult
ConnectionPool::
@ -12622,7 +12622,7 @@ ThreadRunnable::~ThreadRunnable()
MOZ_ASSERT(!mContinueRunning);
}
NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::ThreadRunnable, nsRunnable)
NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::ThreadRunnable, Runnable)
nsresult
ConnectionPool::
@ -13335,8 +13335,7 @@ WaitForTransactionsHelper::CallCallback()
mState = State::Complete;
}
NS_IMPL_ISUPPORTS_INHERITED0(WaitForTransactionsHelper,
nsRunnable)
NS_IMPL_ISUPPORTS_INHERITED0(WaitForTransactionsHelper, Runnable)
NS_IMETHODIMP
WaitForTransactionsHelper::Run()
@ -17747,7 +17746,7 @@ Maintenance::Finish()
mState = State::Complete;
}
NS_IMPL_ISUPPORTS_INHERITED0(Maintenance, nsRunnable)
NS_IMPL_ISUPPORTS_INHERITED0(Maintenance, Runnable)
NS_IMETHODIMP
Maintenance::Run()
@ -19392,7 +19391,7 @@ DatabaseOperationBase::ObjectStoreHasIndexes(DatabaseConnection* aConnection,
}
NS_IMPL_ISUPPORTS_INHERITED(DatabaseOperationBase,
nsRunnable,
Runnable,
mozIStorageProgressHandler)
NS_IMETHODIMP

View File

@ -50,7 +50,7 @@ private:
};
class CleanupFileRunnable final
: public nsRunnable
: public Runnable
{
RefPtr<FileManager> mFileManager;
int64_t mFileId;
@ -243,7 +243,7 @@ CleanupFileRunnable::DoCleanup(FileManager* aFileManager, int64_t aFileId)
}
}
NS_IMPL_ISUPPORTS_INHERITED0(CleanupFileRunnable, nsRunnable)
NS_IMPL_ISUPPORTS_INHERITED0(CleanupFileRunnable, Runnable)
NS_IMETHODIMP
CleanupFileRunnable::Run()

View File

@ -99,7 +99,7 @@ private:
};
class StreamWrapper::CloseRunnable final
: public nsRunnable
: public Runnable
{
friend class StreamWrapper;
@ -283,7 +283,7 @@ StreamWrapper::Deserialize(const InputStreamParams& aParams,
}
NS_IMPL_ISUPPORTS_INHERITED0(StreamWrapper::CloseRunnable,
nsRunnable)
Runnable)
NS_IMETHODIMP
StreamWrapper::

View File

@ -16,7 +16,7 @@
namespace {
class ScriptErrorRunnable final : public nsRunnable
class ScriptErrorRunnable final : public mozilla::Runnable
{
nsString mMessage;
nsCString mMessageName;

View File

@ -16,7 +16,7 @@ namespace mozilla {
namespace dom {
namespace {
class InputPortServiceNotifyRunnable final : public nsRunnable
class InputPortServiceNotifyRunnable final : public Runnable
{
public:
InputPortServiceNotifyRunnable(

View File

@ -1456,7 +1456,7 @@ private:
// dispatch itself to the thread pool again in order to close the file input
// stream.
class BlobParent::OpenStreamRunnable final
: public nsRunnable
: public Runnable
{
friend class nsRevocableEventPtr<OpenStreamRunnable>;
@ -1685,7 +1685,7 @@ private:
}
};
NS_IMPL_ISUPPORTS_INHERITED0(BlobParent::OpenStreamRunnable, nsRunnable)
NS_IMPL_ISUPPORTS_INHERITED0(BlobParent::OpenStreamRunnable, Runnable)
/*******************************************************************************
* BlobChild::RemoteBlobImpl Declaration
@ -1824,7 +1824,7 @@ protected:
};
class BlobChild::RemoteBlobImpl::CreateStreamHelper final
: public nsRunnable
: public Runnable
{
Monitor mMonitor;
RefPtr<RemoteBlobImpl> mRemoteBlobImpl;
@ -2428,7 +2428,7 @@ CreateStreamHelper::RunInternal(RemoteBlobImpl* aBaseRemoteBlobImpl,
}
NS_IMPL_ISUPPORTS_INHERITED0(BlobChild::RemoteBlobImpl::CreateStreamHelper,
nsRunnable)
Runnable)
NS_IMETHODIMP
BlobChild::RemoteBlobImpl::

View File

@ -2002,7 +2002,7 @@ namespace {
// This runnable only exists to delegate ownership of the
// ContentParent to this runnable, until it's deleted by the event
// system.
struct DelayedDeleteContentParentTask : public nsRunnable
struct DelayedDeleteContentParentTask : public Runnable
{
explicit DelayedDeleteContentParentTask(ContentParent* aObj) : mObj(aObj) { }

View File

@ -168,7 +168,7 @@ CrashReporterParent::FinalizeChildData()
}
nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
class NotifyOnMainThread : public nsRunnable
class NotifyOnMainThread : public Runnable
{
public:
explicit NotifyOnMainThread(CrashReporterParent* aCR)

View File

@ -76,7 +76,7 @@ class FilePickerParent : public PFilePickerParent
bool CreateFilePicker();
// This runnable is used to do some I/O operation on a separate thread.
class IORunnable : public nsRunnable
class IORunnable : public Runnable
{
FilePickerParent* mFilePickerParent;
nsTArray<nsCOMPtr<nsIFile>> mFiles;

View File

@ -556,7 +556,7 @@ HangMonitorParent::Open(Transport* aTransport, ProcessId aPid,
MOZ_ASSERT(ok);
}
class HangObserverNotifier final : public nsRunnable
class HangObserverNotifier final : public Runnable
{
public:
HangObserverNotifier(HangMonitoredProcess* aProcess,
@ -637,7 +637,7 @@ HangMonitorParent::RecvHangEvidence(const HangData& aHangData)
return true;
}
class ClearHangNotifier final : public nsRunnable
class ClearHangNotifier final : public Runnable
{
public:
explicit ClearHangNotifier(HangMonitoredProcess* aProcess)

View File

@ -337,7 +337,7 @@ public:
}
};
class TabChild::CachedFileDescriptorCallbackRunnable : public nsRunnable
class TabChild::CachedFileDescriptorCallbackRunnable : public Runnable
{
typedef TabChild::CachedFileDescriptorInfo CachedFileDescriptorInfo;
@ -373,7 +373,7 @@ private:
};
class TabChild::DelayedDeleteRunnable final
: public nsRunnable
: public Runnable
{
RefPtr<TabChild> mTabChild;

View File

@ -110,7 +110,7 @@ using namespace mozilla::jsipc;
// from the ones registered by webProgressListeners.
#define NOTIFY_FLAG_SHIFT 16
class OpenFileAndSendFDRunnable : public nsRunnable
class OpenFileAndSendFDRunnable : public mozilla::Runnable
{
const nsString mPath;
RefPtr<TabParent> mTabParent;
@ -2835,7 +2835,7 @@ TabParent::NavigateByKey(bool aForward, bool aForDocumentNavigation)
}
class LayerTreeUpdateRunnable final
: public nsRunnable
: public mozilla::Runnable
{
uint64_t mLayersId;
bool mActive;

View File

@ -50,7 +50,7 @@ namespace mozilla {
// changes listed in mBlockChanges to file. Read() checks mBlockChanges and
// determines the current data to return, reading from file or from
// mBlockChanges as necessary.
class FileBlockCache : public nsRunnable {
class FileBlockCache : public Runnable {
public:
enum {
BLOCK_SIZE = MediaCacheStream::BLOCK_SIZE

View File

@ -163,7 +163,7 @@ ThreadedDriver::~ThreadedDriver()
mThread->Shutdown();
}
}
class MediaStreamGraphInitThreadRunnable : public nsRunnable {
class MediaStreamGraphInitThreadRunnable : public Runnable {
public:
explicit MediaStreamGraphInitThreadRunnable(ThreadedDriver* aDriver)
: mDriver(aDriver)
@ -405,7 +405,7 @@ OfflineClockDriver::OfflineClockDriver(MediaStreamGraphImpl* aGraphImpl, GraphTi
}
class MediaStreamGraphShutdownThreadRunnable : public nsRunnable {
class MediaStreamGraphShutdownThreadRunnable : public Runnable {
public:
explicit MediaStreamGraphShutdownThreadRunnable(nsIThread* aThread)
: mThread(aThread)

View File

@ -528,7 +528,7 @@ private:
bool mMicrophoneActive;
};
class AsyncCubebTask : public nsRunnable
class AsyncCubebTask : public Runnable
{
public:

View File

@ -44,7 +44,7 @@ GetLatencyLog()
return sLog;
}
class LogEvent : public nsRunnable
class LogEvent : public Runnable
{
public:
LogEvent(AsyncLatencyLogger::LatencyLogIndex aIndex, uint64_t aID, int64_t aValue,

View File

@ -1376,7 +1376,7 @@ MediaCache::Update()
mSuspendedStatusToNotify.Clear();
}
class UpdateEvent : public nsRunnable
class UpdateEvent : public Runnable
{
public:
NS_IMETHOD Run()

View File

@ -224,7 +224,7 @@ MediaDecoderReader::AsyncReadMetadata()
return MetadataPromise::CreateAndResolve(metadata, __func__);
}
class ReRequestVideoWithSkipTask : public nsRunnable
class ReRequestVideoWithSkipTask : public Runnable
{
public:
ReRequestVideoWithSkipTask(MediaDecoderReader* aReader,
@ -251,7 +251,7 @@ private:
const int64_t mTimeThreshold;
};
class ReRequestAudioTask : public nsRunnable
class ReRequestAudioTask : public Runnable
{
public:
explicit ReRequestAudioTask(MediaDecoderReader* aReader)

View File

@ -133,7 +133,7 @@ class ListenerHelper {
// NS_NewRunnableFunction will result in 2 copies of the event data.
// One is captured by the lambda and the other is the copy of the lambda.
template <typename... Ts>
class R : public nsRunnable {
class R : public Runnable {
public:
template <typename... Us>
R(RevocableToken* aToken, const Function& aFunction, Us&&... aEvents)

View File

@ -192,7 +192,7 @@ MediaFormatReader::Init()
}
#ifdef MOZ_EME
class DispatchKeyNeededEvent : public nsRunnable {
class DispatchKeyNeededEvent : public Runnable {
public:
DispatchKeyNeededEvent(AbstractMediaDecoder* aDecoder,
nsTArray<uint8_t>& aInitData,

View File

@ -398,7 +398,7 @@ private:
* so it can be released correctly.
*/
template<class SuccessCallbackType>
class ErrorCallbackRunnable : public nsRunnable
class ErrorCallbackRunnable : public Runnable
{
public:
ErrorCallbackRunnable(
@ -449,7 +449,7 @@ private:
};
// Handle removing GetUserMediaCallbackMediaStreamListener from main thread
class GetUserMediaListenerRemove: public nsRunnable
class GetUserMediaListenerRemove: public Runnable
{
public:
GetUserMediaListenerRemove(uint64_t aWindowID,
@ -734,7 +734,7 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(FakeTrackSourceGetter,
* GetUserMedia spec does not allow for more than 2 streams to be obtained in
* one call, to simplify handling of constraints.
*/
class GetUserMediaStreamRunnable : public nsRunnable
class GetUserMediaStreamRunnable : public Runnable
{
public:
GetUserMediaStreamRunnable(
@ -1295,7 +1295,7 @@ private:
};
#if defined(ANDROID) && !defined(MOZ_WIDGET_GONK)
class GetUserMediaRunnableWrapper : public nsRunnable
class GetUserMediaRunnableWrapper : public Runnable
{
public:
// This object must take ownership of task
@ -2620,7 +2620,7 @@ MediaManager::Shutdown()
{
public:
ShutdownTask(MediaManager* aManager,
nsRunnable* aReply)
Runnable* aReply)
: mManager(aManager)
, mReply(aReply) {}
private:
@ -2644,7 +2644,7 @@ MediaManager::Shutdown()
}
}
RefPtr<MediaManager> mManager;
RefPtr<nsRunnable> mReply;
RefPtr<Runnable> mReply;
};
// Post ShutdownTask to execute on mMediaThread and pass in a lambda

View File

@ -339,7 +339,7 @@ private:
RefPtr<SourceMediaStream> mStream; // threadsafe refcnt
};
class GetUserMediaNotificationEvent: public nsRunnable
class GetUserMediaNotificationEvent: public Runnable
{
public:
enum GetUserMediaStatus {
@ -389,7 +389,7 @@ typedef enum {
class MediaManager;
class GetUserMediaTask;
class ReleaseMediaOperationResource : public nsRunnable
class ReleaseMediaOperationResource : public Runnable
{
public:
ReleaseMediaOperationResource(already_AddRefed<DOMMediaStream> aStream,

View File

@ -166,7 +166,7 @@ class MediaRecorder::Session: public nsIObserver,
// Main thread task.
// Create a blob event and send back to client.
class PushBlobRunnable : public nsRunnable
class PushBlobRunnable : public Runnable
{
public:
explicit PushBlobRunnable(Session* aSession)
@ -196,7 +196,7 @@ class MediaRecorder::Session: public nsIObserver,
};
// Notify encoder error, run in main thread task. (Bug 1095381)
class EncoderErrorNotifierRunnable : public nsRunnable
class EncoderErrorNotifierRunnable : public Runnable
{
public:
explicit EncoderErrorNotifierRunnable(Session* aSession)
@ -224,7 +224,7 @@ class MediaRecorder::Session: public nsIObserver,
};
// Fire start event and set mimeType, run in main thread task.
class DispatchStartEventRunnable : public nsRunnable
class DispatchStartEventRunnable : public Runnable
{
public:
DispatchStartEventRunnable(Session* aSession, const nsAString & aEventName)
@ -253,7 +253,7 @@ class MediaRecorder::Session: public nsIObserver,
// Record thread task and it run in Media Encoder thread.
// Fetch encoded Audio/Video data from MediaEncoder.
class ExtractRunnable : public nsRunnable
class ExtractRunnable : public Runnable
{
public:
explicit ExtractRunnable(Session* aSession)
@ -353,7 +353,7 @@ class MediaRecorder::Session: public nsIObserver,
};
// Main thread task.
// To delete RecordingSession object.
class DestroyRunnable : public nsRunnable
class DestroyRunnable : public Runnable
{
public:
explicit DestroyRunnable(Session* aSession)

View File

@ -893,7 +893,7 @@ SetImageToBlackPixel(PlanarYCbCrImage* aImage)
aImage->CopyData(data);
}
class VideoFrameContainerInvalidateRunnable : public nsRunnable {
class VideoFrameContainerInvalidateRunnable : public Runnable {
public:
explicit VideoFrameContainerInvalidateRunnable(VideoFrameContainer* aVideoFrameContainer)
: mVideoFrameContainer(aVideoFrameContainer)
@ -1593,7 +1593,7 @@ MediaStreamGraphImpl::ForceShutDown(ShutdownTicket* aShutdownTicket)
namespace {
class MediaStreamGraphShutDownRunnable : public nsRunnable {
class MediaStreamGraphShutDownRunnable : public Runnable {
public:
explicit MediaStreamGraphShutDownRunnable(MediaStreamGraphImpl* aGraph)
: mGraph(aGraph)
@ -1653,7 +1653,7 @@ private:
RefPtr<MediaStreamGraphImpl> mGraph;
};
class MediaStreamGraphStableStateRunnable : public nsRunnable {
class MediaStreamGraphStableStateRunnable : public Runnable {
public:
explicit MediaStreamGraphStableStateRunnable(MediaStreamGraphImpl* aGraph,
bool aSourceIsMSG)
@ -2585,7 +2585,7 @@ MediaStream::AddMainThreadListener(MainThreadMediaStreamListener* aListener)
return;
}
class NotifyRunnable final : public nsRunnable
class NotifyRunnable final : public Runnable
{
public:
explicit NotifyRunnable(MediaStream* aStream)
@ -2605,7 +2605,7 @@ MediaStream::AddMainThreadListener(MainThreadMediaStreamListener* aListener)
RefPtr<MediaStream> mStream;
};
RefPtr<nsRunnable> runnable = new NotifyRunnable(this);
nsCOMPtr<nsIRunnable> runnable = new NotifyRunnable(this);
NS_WARN_IF(NS_FAILED(NS_DispatchToMainThread(runnable.forget())));
}
@ -3477,7 +3477,7 @@ MediaStreamGraph::AddStream(MediaStream* aStream)
graph->AppendMessage(MakeUnique<CreateMessage>(aStream));
}
class GraphStartedRunnable final : public nsRunnable
class GraphStartedRunnable final : public Runnable
{
public:
GraphStartedRunnable(AudioNodeStream* aStream, MediaStreamGraph* aGraph)

View File

@ -136,7 +136,7 @@ TextTrackList::DidSeek()
}
}
class TrackEventRunner final: public nsRunnable
class TrackEventRunner final: public Runnable
{
public:
TrackEventRunner(TextTrackList* aList, nsIDOMEvent* aEvent)

View File

@ -79,7 +79,7 @@ private:
};
// Shuts down a thread asynchronously.
class ShutdownThreadEvent : public nsRunnable
class ShutdownThreadEvent : public Runnable
{
public:
explicit ShutdownThreadEvent(nsIThread* aThread) : mThread(aThread) {}
@ -94,7 +94,7 @@ private:
};
template<class T>
class DeleteObjectTask: public nsRunnable {
class DeleteObjectTask: public Runnable {
public:
explicit DeleteObjectTask(nsAutoPtr<T>& aObject)
: mObject(aObject)

View File

@ -42,7 +42,7 @@ static char* GetResource(Decoder *aDecoder)
return static_cast<char*>(aDecoder->mResource);
}
class GetIntPrefEvent : public nsRunnable {
class GetIntPrefEvent : public Runnable {
public:
GetIntPrefEvent(const char* aPref, int32_t* aResult)
: mPref(aPref), mResult(aResult) {}

View File

@ -106,7 +106,7 @@ ReadCRLF (StreamType* aStream, nsLineBuffer<CharT> * aBuffer,
// protocol. It parses the headers and forwards data from the MediaResource
// associated with the URL back to client. When the request is complete it will
// shutdown the thread.
class ServeResourceEvent : public nsRunnable {
class ServeResourceEvent : public Runnable {
private:
// Reading from this reads the data sent from the client.
nsCOMPtr<nsIInputStream> mInput;

View File

@ -37,7 +37,7 @@ class MediaResource;
this is done by the Start() static method by synchronously
dispatching to the main thread.
*/
class AndroidMediaResourceServer : public nsRunnable
class AndroidMediaResourceServer : public Runnable
{
private:
// Mutex protecting private members of AndroidMediaResourceServer.

View File

@ -23,7 +23,7 @@ CDMCallbackProxy::CDMCallbackProxy(CDMProxy* aProxy)
}
class SetSessionIdTask : public nsRunnable {
class SetSessionIdTask : public Runnable {
public:
SetSessionIdTask(CDMProxy* aProxy,
uint32_t aToken,
@ -56,7 +56,7 @@ CDMCallbackProxy::SetSessionId(uint32_t aToken,
NS_DispatchToMainThread(task);
}
class LoadSessionTask : public nsRunnable {
class LoadSessionTask : public Runnable {
public:
LoadSessionTask(CDMProxy* aProxy,
uint32_t aPromiseId,
@ -97,7 +97,7 @@ CDMCallbackProxy::ResolvePromise(uint32_t aPromiseId)
mProxy->ResolvePromise(aPromiseId);
}
class RejectPromiseTask : public nsRunnable {
class RejectPromiseTask : public Runnable {
public:
RejectPromiseTask(CDMProxy* aProxy,
uint32_t aPromiseId,
@ -137,7 +137,7 @@ CDMCallbackProxy::RejectPromise(uint32_t aPromiseId,
NS_DispatchToMainThread(task);
}
class SessionMessageTask : public nsRunnable {
class SessionMessageTask : public Runnable {
public:
SessionMessageTask(CDMProxy* aProxy,
const nsCString& aSessionId,
@ -177,7 +177,7 @@ CDMCallbackProxy::SessionMessage(const nsCString& aSessionId,
NS_DispatchToMainThread(task);
}
class ExpirationChangeTask : public nsRunnable {
class ExpirationChangeTask : public Runnable {
public:
ExpirationChangeTask(CDMProxy* aProxy,
const nsCString& aSessionId,
@ -235,7 +235,7 @@ CDMCallbackProxy::SessionClosed(const nsCString& aSessionId)
NS_DispatchToMainThread(task);
}
class SessionErrorTask : public nsRunnable {
class SessionErrorTask : public Runnable {
public:
SessionErrorTask(CDMProxy* aProxy,
const nsCString& aSessionId,

View File

@ -268,7 +268,7 @@ private:
// GMP thread only.
void gmp_Decrypt(RefPtr<DecryptJob> aJob);
class RejectPromiseTask : public nsRunnable {
class RejectPromiseTask : public Runnable {
public:
RejectPromiseTask(CDMProxy* aProxy,
PromiseId aId,

View File

@ -47,7 +47,7 @@ GMPContentParent::~GMPContentParent()
new DeleteTask<Transport>(GetTransport()));
}
class ReleaseGMPContentParent : public nsRunnable
class ReleaseGMPContentParent : public Runnable
{
public:
explicit ReleaseGMPContentParent(GMPContentParent* aToRelease)

View File

@ -472,7 +472,7 @@ GMPParent::Shutdown()
MOZ_ASSERT(mState == GMPStateNotLoaded);
}
class NotifyGMPShutdownTask : public nsRunnable {
class NotifyGMPShutdownTask : public Runnable {
public:
explicit NotifyGMPShutdownTask(const nsAString& aNodeId)
: mNodeId(aNodeId)
@ -1047,7 +1047,7 @@ GMPParent::RecvAsyncShutdownComplete()
return true;
}
class RunCreateContentParentCallbacks : public nsRunnable
class RunCreateContentParentCallbacks : public Runnable
{
public:
explicit RunCreateContentParentCallbacks(GMPContentParent* aGMPContentParent)

View File

@ -65,7 +65,7 @@ namespace gmp {
static StaticRefPtr<GeckoMediaPluginService> sSingletonService;
class GMPServiceCreateHelper final : public nsRunnable
class GMPServiceCreateHelper final : public mozilla::Runnable
{
RefPtr<GeckoMediaPluginService> mService;

View File

@ -304,7 +304,7 @@ GMPServiceChild::GetAlreadyBridgedTo(nsTArray<base::ProcessId>& aAlreadyBridgedT
}
}
class OpenPGMPServiceChild : public nsRunnable
class OpenPGMPServiceChild : public mozilla::Runnable
{
public:
OpenPGMPServiceChild(UniquePtr<GMPServiceChild>&& aGMPServiceChild,

View File

@ -782,7 +782,7 @@ GeckoMediaPluginServiceParent::LoadFromEnvironment()
return GenericPromise::All(thread, promises);
}
class NotifyObserversTask final : public nsRunnable {
class NotifyObserversTask final : public mozilla::Runnable {
public:
explicit NotifyObserversTask(const char* aTopic, nsString aData = EmptyString())
: mTopic(aTopic)
@ -878,11 +878,6 @@ GeckoMediaPluginServiceParent::RemoveAndDeletePluginDirectory(
aDefer));
}
class DummyRunnable : public nsRunnable {
public:
NS_IMETHOD Run() { return NS_OK; }
};
NS_IMETHODIMP
GeckoMediaPluginServiceParent::GetPluginVersionForAPI(const nsACString& aAPI,
nsTArray<nsCString>* aTags,
@ -933,7 +928,7 @@ GeckoMediaPluginServiceParent::EnsurePluginsOnDiskScanned()
// cause an event to be dispatched to which scans for plugins. We
// dispatch a sync event to the GMP thread here in order to wait until
// after the GMP thread has scanned any paths in MOZ_GMP_PATH.
nsresult rv = GMPDispatch(new DummyRunnable(), NS_DISPATCH_SYNC);
nsresult rv = GMPDispatch(new mozilla::Runnable(), NS_DISPATCH_SYNC);
NS_ENSURE_SUCCESS(rv, rv);
MOZ_ASSERT(mScannedPluginOnDisk, "Should have scanned MOZ_GMP_PATH by now");
}
@ -1833,7 +1828,7 @@ GMPServiceParent::RecvGetGMPPluginVersionForAPI(const nsCString& aAPI,
*aVersion));
}
class DeleteGMPServiceParent : public nsRunnable
class DeleteGMPServiceParent : public mozilla::Runnable
{
public:
explicit DeleteGMPServiceParent(GMPServiceParent* aToDelete)
@ -1856,7 +1851,7 @@ GMPServiceParent::ActorDestroy(ActorDestroyReason aWhy)
NS_DispatchToCurrentThread(new DeleteGMPServiceParent(this));
}
class OpenPGMPServiceParent : public nsRunnable
class OpenPGMPServiceParent : public mozilla::Runnable
{
public:
OpenPGMPServiceParent(GMPServiceParent* aGMPServiceParent,

View File

@ -118,7 +118,7 @@ private:
nsresult EnsurePluginsOnDiskScanned();
nsresult InitStorage();
class PathRunnable : public nsRunnable
class PathRunnable : public Runnable
{
public:
enum EOperation {

View File

@ -351,7 +351,7 @@ private:
NS_IMPL_ISUPPORTS(GMPShutdownObserver, nsIRunnable, nsIObserver)
class NotifyObserversTask : public nsRunnable {
class NotifyObserversTask : public Runnable {
public:
explicit NotifyObserversTask(const char* aTopic)
: mTopic(aTopic)
@ -621,7 +621,7 @@ class GMPStorageTest : public GMPDecryptorProxyCallback
updates.AppendElement(aUpdate);
CreateDecryptor(aOrigin, aTopLevelOrigin, aInPBMode, Move(updates));
}
class Updates : public nsRunnable
class Updates : public Runnable
{
public:
Updates(GMPStorageTest* aRunner, nsTArray<nsCString>&& aUpdates)

View File

@ -147,7 +147,7 @@ private:
void
DispatchTask(FunctionType aFun)
{
RefPtr<nsRunnable> r = NS_NewRunnableFunction(aFun);
RefPtr<Runnable> r = NS_NewRunnableFunction(aFun);
mTaskQueue->Dispatch(r.forget());
}

Some files were not shown because too many files have changed in this diff Show More