1 // Copyright 2016 The Chromium Embedded Framework Authors. All rights 2 // reserved. Use of this source code is governed by a BSD-style license that can 3 // be found in the LICENSE file. 4 5 #ifndef CEF_LIBCEF_COMMON_WAITABLE_EVENT_IMPL_H_ 6 #define CEF_LIBCEF_COMMON_WAITABLE_EVENT_IMPL_H_ 7 #pragma once 8 9 #include "include/cef_waitable_event.h" 10 11 #include "base/synchronization/waitable_event.h" 12 13 class CefWaitableEventImpl : public CefWaitableEvent { 14 public: 15 CefWaitableEventImpl(bool automatic_reset, bool initially_signaled); 16 17 // CefWaitableEvent methods: 18 void Reset() override; 19 void Signal() override; 20 bool IsSignaled() override; 21 void Wait() override; 22 bool TimedWait(int64 max_ms) override; 23 24 private: 25 base::WaitableEvent event_; 26 27 IMPLEMENT_REFCOUNTING(CefWaitableEventImpl); 28 DISALLOW_COPY_AND_ASSIGN(CefWaitableEventImpl); 29 }; 30 31 #endif // CEF_LIBCEF_COMMON_WAITABLE_EVENT_IMPL_H_ 32