Index: blimp/client/public/blimp_client_context_delegate.h |
diff --git a/blimp/client/public/blimp_client_context_delegate.h b/blimp/client/public/blimp_client_context_delegate.h |
index ea51f19ffc4db4f7aa7edbb992fab913aaa19958..e5fd022cac79cd532bfaab49d7856f0a29de7824 100644 |
--- a/blimp/client/public/blimp_client_context_delegate.h |
+++ b/blimp/client/public/blimp_client_context_delegate.h |
@@ -8,6 +8,8 @@ |
#include "base/macros.h" |
#include "blimp/client/public/session/assignment.h" |
+class IdentityProvider; |
+ |
namespace blimp { |
namespace client { |
class BlimpContents; |
@@ -16,6 +18,12 @@ class BlimpContents; |
// functionality it needs from its embedder. |
class BlimpClientContextDelegate { |
public: |
+ // Error propagated to the embedder. |
+ enum BlimpError { |
nyquist
2016/08/12 05:47:05
Do we want to specify that this is Identity-relate
xingliu
2016/08/12 21:11:18
Not sure, I guess this is errors to the embedder.
|
+ NOT_SIGNED_IN = 0, |
+ OAUTH_TOKEN_FAIL, |
+ }; |
+ |
virtual ~BlimpClientContextDelegate() = default; |
// Attaches any required base::SupportsUserData::Data to the BlimpContents. |
@@ -31,6 +39,12 @@ class BlimpClientContextDelegate { |
AssignmentRequestResult result, |
const Assignment& assignment) = 0; |
+ // Create IdentityProvider for OAuth2 token retrieval, used in Authenticator. |
+ virtual std::unique_ptr<IdentityProvider> CreateIdentityProvider() = 0; |
+ |
+ // Propagate error to the embedder. |
+ virtual void OnError(BlimpClientContextDelegate::BlimpError error) = 0; |
nyquist
2016/08/12 05:47:05
Similarly to the BlimpError enum, do we want to ha
xingliu
2016/08/12 21:11:18
Can I put the errors in public? So the delegate an
|
+ |
protected: |
BlimpClientContextDelegate() = default; |