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

Unified Diff: third_party/grpc/include/grpc/impl/codegen/compression_types.h

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
Index: third_party/grpc/include/grpc/impl/codegen/compression_types.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutRubyText.h b/third_party/grpc/include/grpc/impl/codegen/compression_types.h
similarity index 58%
copy from third_party/WebKit/Source/core/layout/LayoutRubyText.h
copy to third_party/grpc/include/grpc/impl/codegen/compression_types.h
index 292ebce85c0f24ae3daebab738d8363597e9d921..0daccd92f237e4021ddd652d0fa532667d101dc7 100644
--- a/third_party/WebKit/Source/core/layout/LayoutRubyText.h
+++ b/third_party/grpc/include/grpc/impl/codegen/compression_types.h
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Copyright 2016, 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,35 +28,46 @@
* 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 LayoutRubyText_h
-#define LayoutRubyText_h
-
-#include "core/layout/LayoutBlockFlow.h"
-
-namespace blink {
-
-class LayoutRubyText final : public LayoutBlockFlow {
-public:
- LayoutRubyText(Element*);
- ~LayoutRubyText() override;
+#ifndef GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H
+#define GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H
- const char* name() const override { return "LayoutRubyText"; }
+#include <grpc/impl/codegen/port_platform.h>
- bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectRubyText || LayoutBlockFlow::isOfType(type); }
+#ifdef __cplusplus
+extern "C" {
+#endif
- bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override;
+/** To be used in channel arguments */
+#define GRPC_COMPRESSION_ALGORITHM_ARG "grpc.compression_algorithm"
+#define GRPC_COMPRESSION_ALGORITHM_STATE_ARG "grpc.compression_algorithm_state"
-private:
- bool avoidsFloats() const override;
+/* The various compression algorithms supported by GRPC */
+typedef enum {
+ GRPC_COMPRESS_NONE = 0,
+ GRPC_COMPRESS_DEFLATE,
+ GRPC_COMPRESS_GZIP,
+ /* TODO(ctiller): snappy */
+ GRPC_COMPRESS_ALGORITHMS_COUNT
+} grpc_compression_algorithm;
- ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const override;
- void adjustInlineDirectionLineBounds(unsigned expansionOpportunityCount, LayoutUnit& logicalLeft, LayoutUnit& logicalWidth) const override;
-};
+typedef enum {
+ GRPC_COMPRESS_LEVEL_NONE = 0,
+ GRPC_COMPRESS_LEVEL_LOW,
+ GRPC_COMPRESS_LEVEL_MED,
+ GRPC_COMPRESS_LEVEL_HIGH,
+ GRPC_COMPRESS_LEVEL_COUNT
+} grpc_compression_level;
-DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutRubyText, isRubyText());
+typedef struct grpc_compression_options {
+ uint32_t enabled_algorithms_bitset; /**< All algs are enabled by default */
+ grpc_compression_algorithm default_compression_algorithm; /**< for channel */
+} grpc_compression_options;
-} // namespace blink
+#ifdef __cplusplus
+}
+#endif
-#endif // LayoutRubyText_h
+#endif /* GRPC_IMPL_CODEGEN_COMPRESSION_TYPES_H */

Powered by Google App Engine
This is Rietveld 408576698