Index: third_party/grpc/src/objective-c/RxLibrary/GRXBufferedPipe.h |
diff --git a/third_party/WebKit/Source/core/css/CSSGridLineNamesValue.h b/third_party/grpc/src/objective-c/RxLibrary/GRXBufferedPipe.h |
similarity index 54% |
copy from third_party/WebKit/Source/core/css/CSSGridLineNamesValue.h |
copy to third_party/grpc/src/objective-c/RxLibrary/GRXBufferedPipe.h |
index 721b95240ed17d693c679416dde38025cfc2e4ce..03b0359278a24fbf7b3578166240fb4796102477 100644 |
--- a/third_party/WebKit/Source/core/css/CSSGridLineNamesValue.h |
+++ b/third_party/grpc/src/objective-c/RxLibrary/GRXBufferedPipe.h |
@@ -1,5 +1,7 @@ |
/* |
- * Copyright (C) 2013 Igalia, S.L. All rights reserved. |
+ * |
+ * Copyright 2015, 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 |
@@ -26,32 +28,35 @@ |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+ * |
*/ |
-#ifndef CSSGridLineNamesValue_h |
-#define CSSGridLineNamesValue_h |
- |
-#include "core/css/CSSValueList.h" |
-#include "wtf/PassRefPtr.h" |
- |
-namespace blink { |
- |
-class CSSGridLineNamesValue : public CSSValueList { |
-public: |
- static CSSGridLineNamesValue* create() |
- { |
- return new CSSGridLineNamesValue(); |
- } |
+#import <Foundation/Foundation.h> |
- String customCSSText() const; |
+#import "GRXWriteable.h" |
+#import "GRXWriter.h" |
- DEFINE_INLINE_TRACE_AFTER_DISPATCH() { CSSValueList::traceAfterDispatch(visitor); } |
- |
-private: |
- CSSGridLineNamesValue(); |
-}; |
+/** |
+ * A buffered pipe is a Writer that also acts as a Writeable. |
+ * Once it is started, whatever values are written into it (via -writeValue:) will be propagated |
+ * immediately, unless flow control prevents it. |
+ * If it is throttled and keeps receiving values, as well as if it receives values before being |
+ * started, it will buffer them and propagate them in order as soon as its state becomes Started. |
+ * If it receives an error (via -writesFinishedWithError:), it will drop any buffered values and |
+ * propagate the error immediately. |
+ * |
+ * Beware that a pipe of this type can't prevent receiving more values when it is paused (for |
+ * example if used to write data to a congested network connection). Because in such situations the |
+ * pipe will keep buffering all data written to it, your application could run out of memory and |
+ * crash. If you want to react to flow control signals to prevent that, instead of using this class |
+ * you can implement an object that conforms to GRXWriter. |
+ * |
+ * Thread-safety: |
+ * The methods of an object of this class should not be called concurrently from different threads. |
+ */ |
+@interface GRXBufferedPipe : GRXWriter<GRXWriteable> |
-DEFINE_CSS_VALUE_TYPE_CASTS(CSSGridLineNamesValue, isGridLineNamesValue()); |
-} // namespace blink |
+/** Convenience constructor. */ |
++ (instancetype)pipe; |
-#endif |
+@end |