Index: third_party/grpc/include/grpc++/impl/grpc_library.h |
diff --git a/third_party/WebKit/public/web/WebTextCheckingType.h b/third_party/grpc/include/grpc++/impl/grpc_library.h |
similarity index 65% |
copy from third_party/WebKit/public/web/WebTextCheckingType.h |
copy to third_party/grpc/include/grpc++/impl/grpc_library.h |
index 486cf0eb480c75a9395151a7d69a5d49be4b6f14..e8a075f5ebb1ced56223723edfcd59a11030811d 100644 |
--- a/third_party/WebKit/public/web/WebTextCheckingType.h |
+++ b/third_party/grpc/include/grpc++/impl/grpc_library.h |
@@ -1,5 +1,7 @@ |
/* |
- * Copyright (C) 2011 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,20 +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 WebTextCheckingType_h |
-#define WebTextCheckingType_h |
+#ifndef GRPCXX_IMPL_GRPC_LIBRARY_H |
+#define GRPCXX_IMPL_GRPC_LIBRARY_H |
+ |
+#include <iostream> |
+ |
+#include <grpc++/impl/codegen/config.h> |
+#include <grpc++/impl/codegen/grpc_library.h> |
+#include <grpc/grpc.h> |
-namespace blink { |
+namespace grpc { |
-enum WebTextCheckingType { |
- WebTextCheckingTypeSpelling = 1 << 1, |
- WebTextCheckingTypeGrammar = 1 << 2, |
+namespace internal { |
+class GrpcLibrary GRPC_FINAL : public GrpcLibraryInterface { |
+ public: |
+ void init() GRPC_OVERRIDE { grpc_init(); } |
+ |
+ void shutdown() GRPC_OVERRIDE { grpc_shutdown(); } |
}; |
-typedef unsigned WebTextCheckingTypeMask; |
+static GrpcLibrary g_gli; |
+ |
+class GrpcLibraryInitializer GRPC_FINAL { |
+ public: |
+ GrpcLibraryInitializer() { grpc::g_glip = &g_gli; } |
+ |
+ /// A no-op method to force the linker to reference this class, which will |
+ /// take care of initializing and shutting down the gRPC runtime. |
+ int summon() { return 0; } |
+}; |
-} // namespace blink |
+} // namespace internal |
+} // namespace grpc |
-#endif |
+#endif // GRPCXX_IMPL_GRPC_LIBRARY_H |