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

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

Issue 2391263005: Propagate error messages to UI for blimp. (Closed)
Patch Set: Minor fixes. Created 4 years, 2 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 ff12c95e621726cd33290ccbe8c2181a0f0d11ef..511c56ba1dde0d28e49652ff473a4a5d3409a581 100644
--- a/blimp/client/public/blimp_client_context_delegate.h
+++ b/blimp/client/public/blimp_client_context_delegate.h
@@ -9,6 +9,7 @@
#include "blimp/client/public/session/assignment.h"
class IdentityProvider;
+class GoogleServiceAuthError;
namespace blimp {
namespace client {
@@ -18,12 +19,6 @@ class BlimpContents;
// functionality it needs from its embedder.
class BlimpClientContextDelegate {
public:
- // Authentication error propagated to the embedder.
- enum AuthError {
- NOT_SIGNED_IN = 0,
- OAUTH_TOKEN_FAIL,
- };
-
virtual ~BlimpClientContextDelegate() = default;
// Attaches any required base::SupportsUserData::Data to the BlimpContents.
@@ -43,8 +38,18 @@ class BlimpClientContextDelegate {
virtual std::unique_ptr<IdentityProvider> CreateIdentityProvider() = 0;
// Propagate authentication error to the embedder.
- virtual void OnAuthenticationError(
- BlimpClientContextDelegate::AuthError error) = 0;
+ virtual void OnAuthenticationError(const GoogleServiceAuthError& error) = 0;
+
+ // Called when the client connected to the engine.
+ virtual void OnConnected() = 0;
+
+ // Called when the client is disconnected from the engine.
+ // See EndConnectionMessage::Reason.
+ virtual void OnEngineDisconnected(int result) = 0;
+
+ // Called when the network is disconnected.
+ // See /net/base/net_errors.h.
+ virtual void OnNetworkDisconnected(int result) = 0;
protected:
BlimpClientContextDelegate() = default;
« no previous file with comments | « blimp/client/core/session/identity_source_unittest.cc ('k') | blimp/client/test/test_blimp_client_context_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698