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 "include/cef_waitable_event.h"
|
2017-05-17 11:29:28 +02:00
|
|
|
|
2016-11-15 22:18:41 +01:00
|
|
|
#include "base/synchronization/waitable_event.h"
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
// CefWaitableEvent methods:
|
|
|
|
void Reset() override;
|
|
|
|
void Signal() override;
|
|
|
|
bool IsSignaled() override;
|
|
|
|
void Wait() override;
|
|
|
|
bool TimedWait(int64 max_ms) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
base::WaitableEvent event_;
|
|
|
|
|
|
|
|
IMPLEMENT_REFCOUNTING(CefWaitableEventImpl);
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(CefWaitableEventImpl);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_COMMON_WAITABLE_EVENT_IMPL_H_
|