Index: third_party/grpc/test/cpp/interop/server_helper.h |
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h b/third_party/grpc/test/cpp/interop/server_helper.h |
similarity index 62% |
copy from third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h |
copy to third_party/grpc/test/cpp/interop/server_helper.h |
index ac5e003d0ac850ad9783e41d975bc786dc959744..57337e52396c05a35da79277be21c36b064b97c8 100644 |
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h |
+++ b/third_party/grpc/test/cpp/interop/server_helper.h |
@@ -1,5 +1,7 @@ |
/* |
- * Copyright (C) 2013 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,33 +28,38 @@ |
* 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 WebServiceWorkerProviderClient_h |
-#define WebServiceWorkerProviderClient_h |
- |
-#include "public/platform/WebCommon.h" |
-#include "public/platform/WebMessagePortChannel.h" |
-#include "public/platform/modules/serviceworker/WebServiceWorker.h" |
+#ifndef GRPC_TEST_CPP_INTEROP_SERVER_HELPER_H |
+#define GRPC_TEST_CPP_INTEROP_SERVER_HELPER_H |
#include <memory> |
-namespace blink { |
+#include <grpc/compression.h> |
+#include <grpc++/server_context.h> |
+#include <grpc++/security/server_credentials.h> |
+ |
+namespace grpc { |
+namespace testing { |
-class WebServiceWorker; |
-class WebString; |
+std::shared_ptr<ServerCredentials> CreateInteropServerCredentials(); |
-// This class is the interface for embedders to talk to |
-// ServiceWorkerContainer. |
-class BLINK_PLATFORM_EXPORT WebServiceWorkerProviderClient { |
-public: |
- virtual ~WebServiceWorkerProviderClient() { } |
+class InteropServerContextInspector { |
+ public: |
+ InteropServerContextInspector(const ::grpc::ServerContext& context); |
- virtual void setController(std::unique_ptr<WebServiceWorker::Handle>, bool shouldNotifyControllerChange) = 0; |
+ // Inspector methods, able to peek inside ServerContext, follow. |
+ std::shared_ptr<const AuthContext> GetAuthContext() const; |
+ bool IsCancelled() const; |
+ grpc_compression_algorithm GetCallCompressionAlgorithm() const; |
+ uint32_t GetEncodingsAcceptedByClient() const; |
- virtual void dispatchMessageEvent(std::unique_ptr<WebServiceWorker::Handle>, const WebString& message, const WebMessagePortChannelArray& channels) = 0; |
+ private: |
+ const ::grpc::ServerContext& context_; |
}; |
-} // namespace blink |
+} // namespace testing |
+} // namespace grpc |
-#endif // WebServiceWorkerProviderClient_h |
+#endif // GRPC_TEST_CPP_INTEROP_SERVER_HELPER_H |