Index: third_party/grpc/include/grpc++/generic/async_generic_service.h |
diff --git a/third_party/WebKit/Source/modules/mediasource/VideoPlaybackQuality.cpp b/third_party/grpc/include/grpc++/generic/async_generic_service.h |
similarity index 59% |
copy from third_party/WebKit/Source/modules/mediasource/VideoPlaybackQuality.cpp |
copy to third_party/grpc/include/grpc++/generic/async_generic_service.h |
index 77c7a3be37199f0883fdddaada2adc4f9f847b2d..9ae8391dc4cff02ecf692ec84da9407e7bf181a6 100644 |
--- a/third_party/WebKit/Source/modules/mediasource/VideoPlaybackQuality.cpp |
+++ b/third_party/grpc/include/grpc++/generic/async_generic_service.h |
@@ -1,5 +1,7 @@ |
/* |
- * Copyright (C) 2013 Google Inc. All rights reserved. |
+ * |
+ * Copyright 2015-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,32 +28,49 @@ |
* 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 "modules/mediasource/VideoPlaybackQuality.h" |
- |
-#include "core/dom/Document.h" |
-#include "core/frame/LocalDOMWindow.h" |
-#include "core/timing/DOMWindowPerformance.h" |
-#include "core/timing/Performance.h" |
- |
-namespace blink { |
- |
-VideoPlaybackQuality* VideoPlaybackQuality::create( |
- const Document& document, unsigned totalVideoFrames, unsigned droppedVideoFrames, unsigned corruptedVideoFrames) |
-{ |
- return new VideoPlaybackQuality(document, totalVideoFrames, droppedVideoFrames, corruptedVideoFrames); |
-} |
- |
-VideoPlaybackQuality::VideoPlaybackQuality( |
- const Document& document, unsigned totalVideoFrames, unsigned droppedVideoFrames, unsigned corruptedVideoFrames) |
- : m_creationTime(0) |
- , m_totalVideoFrames(totalVideoFrames) |
- , m_droppedVideoFrames(droppedVideoFrames) |
- , m_corruptedVideoFrames(corruptedVideoFrames) |
-{ |
- if (document.domWindow()) |
- m_creationTime = DOMWindowPerformance::performance(*(document.domWindow()))->now(); |
-} |
- |
-} // namespace blink |
+#ifndef GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H |
+#define GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H |
+ |
+#include <grpc++/support/byte_buffer.h> |
+#include <grpc++/support/async_stream.h> |
+ |
+struct grpc_server; |
+ |
+namespace grpc { |
+ |
+typedef ServerAsyncReaderWriter<ByteBuffer, ByteBuffer> |
+ GenericServerAsyncReaderWriter; |
+ |
+class GenericServerContext GRPC_FINAL : public ServerContext { |
+ public: |
+ const grpc::string& method() const { return method_; } |
+ const grpc::string& host() const { return host_; } |
+ |
+ private: |
+ friend class Server; |
+ friend class ServerInterface; |
+ |
+ grpc::string method_; |
+ grpc::string host_; |
+}; |
+ |
+class AsyncGenericService GRPC_FINAL { |
+ public: |
+ AsyncGenericService() : server_(nullptr) {} |
+ |
+ void RequestCall(GenericServerContext* ctx, |
+ GenericServerAsyncReaderWriter* reader_writer, |
+ CompletionQueue* call_cq, |
+ ServerCompletionQueue* notification_cq, void* tag); |
+ |
+ private: |
+ friend class Server; |
+ Server* server_; |
+}; |
+ |
+} // namespace grpc |
+ |
+#endif // GRPCXX_GENERIC_ASYNC_GENERIC_SERVICE_H |