Index: third_party/grpc/src/core/iomgr/timer_heap.h |
diff --git a/third_party/WebKit/Source/core/svg/SVGUnitTypes.cpp b/third_party/grpc/src/core/iomgr/timer_heap.h |
similarity index 67% |
copy from third_party/WebKit/Source/core/svg/SVGUnitTypes.cpp |
copy to third_party/grpc/src/core/iomgr/timer_heap.h |
index 2d778fa0346b212190a11bde15b290175118b386..2d220f16774e7af149ca7c06471ede00eb8e5666 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGUnitTypes.cpp |
+++ b/third_party/grpc/src/core/iomgr/timer_heap.h |
@@ -1,5 +1,7 @@ |
/* |
- * Copyright (C) 2014 Google Inc. 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,20 +28,30 @@ |
* 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. |
+ * |
*/ |
-#include "core/svg/SVGUnitTypes.h" |
+#ifndef GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H |
+#define GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H |
+ |
+#include "src/core/iomgr/timer.h" |
+ |
+typedef struct { |
+ grpc_timer **timers; |
+ uint32_t timer_count; |
+ uint32_t timer_capacity; |
+} grpc_timer_heap; |
+ |
+/* return 1 if the new timer is the first timer in the heap */ |
+int grpc_timer_heap_add(grpc_timer_heap *heap, grpc_timer *timer); |
+ |
+void grpc_timer_heap_init(grpc_timer_heap *heap); |
+void grpc_timer_heap_destroy(grpc_timer_heap *heap); |
-namespace blink { |
+void grpc_timer_heap_remove(grpc_timer_heap *heap, grpc_timer *timer); |
+grpc_timer *grpc_timer_heap_top(grpc_timer_heap *heap); |
+void grpc_timer_heap_pop(grpc_timer_heap *heap); |
-template<> const SVGEnumerationStringEntries& getStaticStringEntries<SVGUnitTypes::SVGUnitType>() |
-{ |
- DEFINE_STATIC_LOCAL(SVGEnumerationStringEntries, entries, ()); |
- if (entries.isEmpty()) { |
- entries.append(std::make_pair(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE, "userSpaceOnUse")); |
- entries.append(std::make_pair(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, "objectBoundingBox")); |
- } |
- return entries; |
-} |
+int grpc_timer_heap_is_empty(grpc_timer_heap *heap); |
-} // namespace blink |
+#endif /* GRPC_INTERNAL_CORE_IOMGR_TIMER_HEAP_H */ |