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

Unified Diff: blimp/client/public/blimp_client_context_delegate.h

Issue 2204223005: Blimp OAuth2 token retreival on application start up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add some deps only for gn deps check script. Created 4 years, 4 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
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;

Powered by Google App Engine
This is Rietveld 408576698