• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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   CefWaitableEventImpl(const CefWaitableEventImpl&) = delete;
18   CefWaitableEventImpl& operator=(const CefWaitableEventImpl&) = delete;
19 
20   // CefWaitableEvent methods:
21   void Reset() override;
22   void Signal() override;
23   bool IsSignaled() override;
24   void Wait() override;
25   bool TimedWait(int64 max_ms) override;
26 
27  private:
28   base::WaitableEvent event_;
29 
30   IMPLEMENT_REFCOUNTING(CefWaitableEventImpl);
31 };
32 
33 #endif  // CEF_LIBCEF_COMMON_WAITABLE_EVENT_IMPL_H_
34