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

Unified Diff: third_party/grpc/src/core/surface/server.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/src/core/surface/server.h
diff --git a/third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.h b/third_party/grpc/src/core/surface/server.h
similarity index 52%
copy from third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.h
copy to third_party/grpc/src/core/surface/server.h
index 24fc0eb92a7e93fd1d3ac4bfe2f30ca48fd0e9e4..a957fdb3605fb9f78958af6f78df442baedfb543 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/JavaScriptCallFrame.h
+++ b/third_party/grpc/src/core/surface/server.h
@@ -1,5 +1,7 @@
/*
- * Copyright (c) 2010, 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,52 +28,40 @@
* 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 JavaScriptCallFrame_h
-#define JavaScriptCallFrame_h
-
-#include "platform/inspector_protocol/Collections.h"
-#include "platform/inspector_protocol/String16.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
-#include <v8.h>
-
-namespace blink {
-
-class JavaScriptCallFrame {
-public:
- static PassOwnPtr<JavaScriptCallFrame> create(v8::Local<v8::Context> debuggerContext, v8::Local<v8::Object> callFrame)
- {
- return adoptPtr(new JavaScriptCallFrame(debuggerContext, callFrame));
- }
- ~JavaScriptCallFrame();
-
- int sourceID() const;
- int line() const;
- int column() const;
- int contextId() const;
+#ifndef GRPC_INTERNAL_CORE_SURFACE_SERVER_H
+#define GRPC_INTERNAL_CORE_SURFACE_SERVER_H
- bool isAtReturn() const;
- v8::Local<v8::Object> details() const;
+#include "src/core/channel/channel_stack.h"
+#include <grpc/grpc.h>
+#include "src/core/transport/transport.h"
- v8::MaybeLocal<v8::Value> evaluate(v8::Local<v8::Value> expression);
- v8::MaybeLocal<v8::Value> restart();
- v8::MaybeLocal<v8::Value> setVariableValue(int scopeNumber, v8::Local<v8::Value> variableName, v8::Local<v8::Value> newValue);
-private:
- JavaScriptCallFrame(v8::Local<v8::Context> debuggerContext, v8::Local<v8::Object> callFrame);
+/* Create a server */
+grpc_server *grpc_server_create_from_filters(
+ const grpc_channel_filter **filters, size_t filter_count,
+ const grpc_channel_args *args);
- int callV8FunctionReturnInt(const char* name) const;
+/* Add a listener to the server: when the server starts, it will call start,
+ and when it shuts down, it will call destroy */
+void grpc_server_add_listener(
+ grpc_exec_ctx *exec_ctx, grpc_server *server, void *listener,
+ void (*start)(grpc_exec_ctx *exec_ctx, grpc_server *server, void *arg,
+ grpc_pollset **pollsets, size_t npollsets),
+ void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_server *server, void *arg,
+ grpc_closure *on_done));
- v8::Isolate* m_isolate;
- OwnPtr<JavaScriptCallFrame> m_caller;
- v8::Global<v8::Context> m_debuggerContext;
- v8::Global<v8::Object> m_callFrame;
- v8::Global<v8::FunctionTemplate> m_wrapperTemplate;
-};
+/* Setup a transport - creates a channel stack, binds the transport to the
+ server */
+void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *server,
+ grpc_transport *transport,
+ grpc_channel_filter const **extra_filters,
+ size_t num_extra_filters,
+ const grpc_channel_args *args);
-using JavaScriptCallFrames = protocol::Vector<OwnPtr<JavaScriptCallFrame>>;
+const grpc_channel_args *grpc_server_get_channel_args(grpc_server *server);
-} // namespace blink
+int grpc_server_has_open_connections(grpc_server *server);
-#endif // JavaScriptCallFrame_h
+#endif /* GRPC_INTERNAL_CORE_SURFACE_SERVER_H */
« no previous file with comments | « third_party/grpc/src/core/surface/secure_channel_create.c ('k') | third_party/grpc/src/core/surface/server.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698