Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/webrtc_overrides/webrtc/rtc_base/event.h

Issue 2975553002: Override rtc::Event with Chromium's implementation (Closed)
Patch Set: Move and update files Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/webrtc_overrides/webrtc/rtc_base/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/webrtc_overrides/webrtc/rtc_base/event.h
diff --git a/third_party/webrtc_overrides/webrtc/rtc_base/event.h b/third_party/webrtc_overrides/webrtc/rtc_base/event.h
new file mode 100644
index 0000000000000000000000000000000000000000..2626ecc1a449266d01ff92ece6f99b5dd3650313
--- /dev/null
+++ b/third_party/webrtc_overrides/webrtc/rtc_base/event.h
@@ -0,0 +1,35 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef THIRD_PARTY_WEBRTC_OVERRIDES_WEBRTC_RTC_BASE_EVENT_H_
+#define THIRD_PARTY_WEBRTC_OVERRIDES_WEBRTC_RTC_BASE_EVENT_H_
+
+#include "base/macros.h"
+#include "base/synchronization/waitable_event.h"
+
+namespace rtc {
+
+// Overrides WebRTC's internal event implementation to use Chromium's.
+class Event {
+ public:
+ static const int kForever = -1;
+
+ Event(bool manual_reset, bool initially_signaled);
+ ~Event();
+
+ void Set();
+ void Reset();
+
+ // Wait for the event to become signaled, for the specified number of
+ // |milliseconds|. To wait indefinetly, pass kForever.
+ bool Wait(int milliseconds);
+
+ private:
+ base::WaitableEvent event_;
+ DISALLOW_IMPLICIT_CONSTRUCTORS(Event);
+};
+
+} // namespace rtc
+
+#endif // THIRD_PARTY_WEBRTC_OVERRIDES_WEBRTC_RTC_BASE_EVENT_H_
« no previous file with comments | « no previous file | third_party/webrtc_overrides/webrtc/rtc_base/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698