Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(719)

Unified Diff: third_party/grpc/test/cpp/interop/client_helper.h

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/grpc/test/cpp/interop/client.cc ('k') | third_party/grpc/test/cpp/interop/client_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/grpc/test/cpp/interop/client_helper.h
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h b/third_party/grpc/test/cpp/interop/client_helper.h
similarity index 59%
copy from third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
copy to third_party/grpc/test/cpp/interop/client_helper.h
index ac5e003d0ac850ad9783e41d975bc786dc959744..0f77474139e18a66441f3e8f7ca9df93bce16262 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h
+++ b/third_party/grpc/test/cpp/interop/client_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,47 @@
* 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_CLIENT_HELPER_H
+#define GRPC_TEST_CPP_INTEROP_CLIENT_HELPER_H
#include <memory>
-namespace blink {
+#include <grpc++/channel.h>
+
+#include "src/core/surface/call_test_only.h"
+
+namespace grpc {
+namespace testing {
+
+grpc::string GetServiceAccountJsonKey();
+
+grpc::string GetOauth2AccessToken();
+
+std::shared_ptr<Channel> CreateChannelForTestCase(
+ const grpc::string& test_case);
-class WebServiceWorker;
-class WebString;
+class InteropClientContextInspector {
+ public:
+ InteropClientContextInspector(const ::grpc::ClientContext& context)
+ : context_(context) {}
-// This class is the interface for embedders to talk to
-// ServiceWorkerContainer.
-class BLINK_PLATFORM_EXPORT WebServiceWorkerProviderClient {
-public:
- virtual ~WebServiceWorkerProviderClient() { }
+ // Inspector methods, able to peek inside ClientContext, follow.
+ grpc_compression_algorithm GetCallCompressionAlgorithm() const {
+ return grpc_call_test_only_get_compression_algorithm(context_.call_);
+ }
- virtual void setController(std::unique_ptr<WebServiceWorker::Handle>, bool shouldNotifyControllerChange) = 0;
+ uint32_t GetMessageFlags() const {
+ return grpc_call_test_only_get_message_flags(context_.call_);
+ }
- virtual void dispatchMessageEvent(std::unique_ptr<WebServiceWorker::Handle>, const WebString& message, const WebMessagePortChannelArray& channels) = 0;
+ private:
+ const ::grpc::ClientContext& context_;
};
-} // namespace blink
+} // namespace testing
+} // namespace grpc
-#endif // WebServiceWorkerProviderClient_h
+#endif // GRPC_TEST_CPP_INTEROP_CLIENT_HELPER_H
« no previous file with comments | « third_party/grpc/test/cpp/interop/client.cc ('k') | third_party/grpc/test/cpp/interop/client_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698