2016-11-15 22:18:41 +01:00
|
|
|
// Copyright 2016 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that can
|
|
|
|
// be found in the LICENSE file.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
#ifndef CEF_LIBCEF_COMMON_WAITABLE_EVENT_IMPL_H_
|
|
|
|
#define CEF_LIBCEF_COMMON_WAITABLE_EVENT_IMPL_H_
|
2016-11-15 22:18:41 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "base/synchronization/waitable_event.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
#include "cef/include/cef_waitable_event.h"
|
2016-11-15 22:18:41 +01:00
|
|
|
|
|
|
|
class CefWaitableEventImpl : public CefWaitableEvent {
|
|
|
|
public:
|
2017-05-17 11:29:28 +02:00
|
|
|
CefWaitableEventImpl(bool automatic_reset, bool initially_signaled);
|
2016-11-15 22:18:41 +01:00
|
|
|
|
2021-12-06 21:40:25 +01:00
|
|
|
CefWaitableEventImpl(const CefWaitableEventImpl&) = delete;
|
|
|
|
CefWaitableEventImpl& operator=(const CefWaitableEventImpl&) = delete;
|
|
|
|
|
2016-11-15 22:18:41 +01:00
|
|
|
// CefWaitableEvent methods:
|
|
|
|
void Reset() override;
|
|
|
|
void Signal() override;
|
|
|
|
bool IsSignaled() override;
|
|
|
|
void Wait() override;
|
2023-06-01 16:06:15 +02:00
|
|
|
bool TimedWait(int64_t max_ms) override;
|
2016-11-15 22:18:41 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
base::WaitableEvent event_;
|
|
|
|
|
|
|
|
IMPLEMENT_REFCOUNTING(CefWaitableEventImpl);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_COMMON_WAITABLE_EVENT_IMPL_H_
|