gecko-dev/xpcom/threads/EventQueue.h
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00

48 lines
1.7 KiB
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_EventQueue_h
#define mozilla_EventQueue_h
#include "mozilla/AbstractEventQueue.h"
#include "mozilla/Queue.h"
#include "nsCOMPtr.h"
class nsIRunnable;
namespace mozilla {
class EventQueue final : public AbstractEventQueue
{
public:
EventQueue() {}
explicit EventQueue(EventPriority aPriority);
void PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
EventPriority aPriority,
const MutexAutoLock& aProofOfLock) final override;
already_AddRefed<nsIRunnable> GetEvent(EventPriority* aPriority,
const MutexAutoLock& aProofOfLock) final override;
bool IsEmpty(const MutexAutoLock& aProofOfLock) final override;
bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final override;
size_t Count(const MutexAutoLock& aProofOfLock) const final override;
already_AddRefed<nsIRunnable> PeekEvent(const MutexAutoLock& aProofOfLock);
void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
private:
mozilla::Queue<nsCOMPtr<nsIRunnable>> mQueue;
};
} // namespace mozilla
#endif // mozilla_EventQueue_h