Index: third_party/grpc/src/objective-c/GRPCClient/GRPCCall+OAuth2.h |
diff --git a/third_party/WebKit/public/web/WebPrerendererClient.h b/third_party/grpc/src/objective-c/GRPCClient/GRPCCall+OAuth2.h |
similarity index 66% |
copy from third_party/WebKit/public/web/WebPrerendererClient.h |
copy to third_party/grpc/src/objective-c/GRPCClient/GRPCCall+OAuth2.h |
index 4648d956959ac571f97945e1d60da9ba7070e618..6b443877e9b7dc57e97a1144f952a2525619434d 100644 |
--- a/third_party/WebKit/public/web/WebPrerendererClient.h |
+++ b/third_party/grpc/src/objective-c/GRPCClient/GRPCCall+OAuth2.h |
@@ -1,5 +1,7 @@ |
/* |
- * Copyright (C) 2012 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 |
@@ -29,20 +31,21 @@ |
* |
*/ |
-#ifndef WebPrerendererClient_h |
-#define WebPrerendererClient_h |
- |
-#include "../platform/WebCommon.h" |
+#import "GRPCCall.h" |
-namespace blink { |
+/** Helpers for setting and reading headers compatible with OAuth2. */ |
+@interface GRPCCall (OAuth2) |
-class WebPrerender; |
- |
-class WebPrerendererClient { |
-public: |
- virtual void willAddPrerender(WebPrerender*) = 0; |
-}; |
+/** |
+ * Setting this property is equivalent to setting "Bearer <passed token>" as the value of the |
+ * request header with key "authorization" (the authorization header). Setting it to nil removes the |
+ * authorization header from the request. |
+ * The value obtained by getting the property is the OAuth2 bearer token if the authorization header |
+ * of the request has the form "Bearer <token>", or nil otherwise. |
+ */ |
+@property(atomic, copy) NSString *oauth2AccessToken; |
-} // namespace blink |
+/** Returns the value (if any) of the "www-authenticate" response header (the challenge header). */ |
+@property(atomic, readonly) NSString *oauth2ChallengeHeader; |
-#endif // WebPrerendererClient_h |
+@end |