| 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 */
|
|
|