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

Unified Diff: third_party/grpc/include/grpc++/generic/async_generic_service.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++/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
« no previous file with comments | « third_party/grpc/include/grpc++/create_channel.h ('k') | third_party/grpc/include/grpc++/generic/generic_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698