Index: public/platform/WebWaitableEvent.h |
diff --git a/public/platform/WebSocketStreamHandle.h b/public/platform/WebWaitableEvent.h |
similarity index 70% |
copy from public/platform/WebSocketStreamHandle.h |
copy to public/platform/WebWaitableEvent.h |
index 60a469ac2a09d561bdd05015bf603a8dc62c0f0f..2b44d7b1b747fcce048d2a0c6f2d218363136b76 100644 |
--- a/public/platform/WebSocketStreamHandle.h |
+++ b/public/platform/WebWaitableEvent.h |
@@ -1,5 +1,5 @@ |
/* |
- * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
+ * Copyright (C) 2014 Google Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are |
@@ -28,31 +28,28 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef WebSocketStreamHandle_h |
-#define WebSocketStreamHandle_h |
+#ifndef WebWaitableEvent_h |
+#define WebWaitableEvent_h |
#include "WebCommon.h" |
namespace blink { |
-class WebData; |
-class WebSocketStreamHandleClient; |
-class WebURL; |
- |
-class WebSocketStreamHandle { |
+// Provides a thread synchronization that can be used to allow one thread to |
+// wait until another thread to finish some work. |
+class BLINK_PLATFORM_EXPORT WebWaitableEvent { |
public: |
- virtual ~WebSocketStreamHandle() { } |
- |
- // Connect new socket stream asynchronously. |
- virtual void connect(const WebURL&, WebSocketStreamHandleClient*) { } |
+ virtual ~WebWaitableEvent() { } |
- // Send web socket frame data on the socket stream. |
- virtual bool send(const WebData&) { return false; } |
+ // Waits indefinitely for the event to be signaled. |
+ virtual void wait() = 0; |
- // Close the socket stream. |
- virtual void close() { } |
+ // Puts the event in the signaled state. Causing any thread blocked on Wait |
+ // to be woken up. The event state is reset to non-signaled after |
+ // a waiting thread has been released. |
+ virtual void signal() = 0; |
}; |
} // namespace blink |
-#endif |
+#endif // WebWaitableEvent_h |