Index: third_party/grpc/src/node/ext/server.h |
diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositedSelectionBound.h b/third_party/grpc/src/node/ext/server.h |
similarity index 53% |
copy from third_party/WebKit/Source/core/layout/compositing/CompositedSelectionBound.h |
copy to third_party/grpc/src/node/ext/server.h |
index 54cc7e0c60d4ad8f1d9ada08baa775bf0ae346cf..ab5fc210e8ace61e6021d197fc11577d166723cc 100644 |
--- a/third_party/WebKit/Source/core/layout/compositing/CompositedSelectionBound.h |
+++ b/third_party/grpc/src/node/ext/server.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,35 +28,55 @@ |
* 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 CompositedSelectionBound_h |
-#define CompositedSelectionBound_h |
+#ifndef NET_GRPC_NODE_SERVER_H_ |
+#define NET_GRPC_NODE_SERVER_H_ |
+ |
+#include <node.h> |
+#include <nan.h> |
+#include "grpc/grpc.h" |
+ |
+namespace grpc { |
+namespace node { |
+ |
+/* Wraps grpc_server as a JavaScript object. Provides a constructor |
+ and wrapper methods for grpc_server_create, grpc_server_request_call, |
+ grpc_server_add_http2_port, and grpc_server_start. */ |
+class Server : public Nan::ObjectWrap { |
+ public: |
+ /* Initializes the Server class and exposes the constructor and |
+ wrapper methods to JavaScript */ |
+ static void Init(v8::Local<v8::Object> exports); |
+ /* Tests whether the given value was constructed by this class's |
+ JavaScript constructor */ |
+ static bool HasInstance(v8::Local<v8::Value> val); |
-#include "platform/geometry/FloatPoint.h" |
-#include "platform/graphics/GraphicsLayer.h" |
-#include "wtf/Allocator.h" |
+ private: |
+ explicit Server(grpc_server *server); |
+ ~Server(); |
-namespace blink { |
+ // Prevent copying |
+ Server(const Server &); |
+ Server &operator=(const Server &); |
-struct CompositedSelectionBound { |
- STACK_ALLOCATED(); |
- CompositedSelectionBound() |
- : layer(nullptr) |
- , isTextDirectionRTL(false) |
- { |
- } |
+ void ShutdownServer(); |
- // The structure describes the position of a caret in space of the GraphicsLayer the caret resides in. |
- // Where edgeTopInLayer is the top point of the caret, usually on the ascend line of the line box, |
- // and edgeBottomInLayer it the bottom point, on the baseline of the line box. |
- GraphicsLayer* layer; |
- FloatPoint edgeTopInLayer; |
- FloatPoint edgeBottomInLayer; |
+ static NAN_METHOD(New); |
+ static NAN_METHOD(RequestCall); |
+ static NAN_METHOD(AddHttp2Port); |
+ static NAN_METHOD(Start); |
+ static NAN_METHOD(TryShutdown); |
+ static NAN_METHOD(ForceShutdown); |
+ static Nan::Callback *constructor; |
+ static Nan::Persistent<v8::FunctionTemplate> fun_tpl; |
- bool isTextDirectionRTL; |
+ grpc_server *wrapped_server; |
+ grpc_completion_queue *shutdown_queue; |
}; |
-} // namespace blink |
+} // namespace node |
+} // namespace grpc |
-#endif |
+#endif // NET_GRPC_NODE_SERVER_H_ |