| Index: third_party/grpc/src/node/ext/channel.h
|
| diff --git a/third_party/WebKit/public/web/WebFindOptions.h b/third_party/grpc/src/node/ext/channel.h
|
| similarity index 53%
|
| copy from third_party/WebKit/public/web/WebFindOptions.h
|
| copy to third_party/grpc/src/node/ext/channel.h
|
| index 3c3200741e840dd148f4b24446e69868d3e08311..9ec28e15af04accf6499c800abd56947a417b513 100644
|
| --- a/third_party/WebKit/public/web/WebFindOptions.h
|
| +++ b/third_party/grpc/src/node/ext/channel.h
|
| @@ -1,5 +1,7 @@
|
| /*
|
| - * Copyright (C) 2009 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,41 +28,56 @@
|
| * 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 WebFindOptions_h
|
| -#define WebFindOptions_h
|
| +#ifndef NET_GRPC_NODE_CHANNEL_H_
|
| +#define NET_GRPC_NODE_CHANNEL_H_
|
| +
|
| +#include <node.h>
|
| +#include <nan.h>
|
| +#include "grpc/grpc.h"
|
| +
|
| +namespace grpc {
|
| +namespace node {
|
|
|
| -#include "../platform/WebString.h"
|
| +bool ParseChannelArgs(v8::Local<v8::Value> args_val,
|
| + grpc_channel_args **channel_args_ptr);
|
|
|
| -namespace blink {
|
| +void DeallocateChannelArgs(grpc_channel_args *channel_args);
|
|
|
| -// Options used when performing a find-in-page query.
|
| -struct WebFindOptions {
|
| - // Whether to search forward or backward within the page.
|
| - bool forward;
|
| +/* Wrapper class for grpc_channel structs */
|
| +class Channel : public Nan::ObjectWrap {
|
| + public:
|
| + static void Init(v8::Local<v8::Object> exports);
|
| + static bool HasInstance(v8::Local<v8::Value> val);
|
| + /* This is used to typecheck javascript objects before converting them to
|
| + this type */
|
| + static v8::Persistent<v8::Value> prototype;
|
|
|
| - // Whether search should be case-sensitive.
|
| - bool matchCase;
|
| + /* Returns the grpc_channel struct that this object wraps */
|
| + grpc_channel *GetWrappedChannel();
|
|
|
| - // Whether this operation is the first request or a follow-up.
|
| - bool findNext;
|
| + private:
|
| + explicit Channel(grpc_channel *channel);
|
| + ~Channel();
|
|
|
| - // Whether this operation should look for matches only at the start of words.
|
| - bool wordStart;
|
| + // Prevent copying
|
| + Channel(const Channel &);
|
| + Channel &operator=(const Channel &);
|
|
|
| - // When combined with wordStart, accepts a match in the middle of a word if the match begins with
|
| - // an uppercase letter followed by a lowercase or non-letter. Accepts several other intra-word matches.
|
| - bool medialCapitalAsWordStart;
|
| + static NAN_METHOD(New);
|
| + static NAN_METHOD(Close);
|
| + static NAN_METHOD(GetTarget);
|
| + static NAN_METHOD(GetConnectivityState);
|
| + static NAN_METHOD(WatchConnectivityState);
|
| + static Nan::Callback *constructor;
|
| + static Nan::Persistent<v8::FunctionTemplate> fun_tpl;
|
|
|
| - WebFindOptions()
|
| - : forward(true)
|
| - , matchCase(false)
|
| - , findNext(false)
|
| - , wordStart(false)
|
| - , medialCapitalAsWordStart(false) { }
|
| + grpc_channel *wrapped_channel;
|
| };
|
|
|
| -} // namespace blink
|
| +} // namespace node
|
| +} // namespace grpc
|
|
|
| -#endif
|
| +#endif // NET_GRPC_NODE_CHANNEL_H_
|
|
|