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

Unified Diff: blimp/client/core/blimp_client_context_impl.h

Issue 2322843002: Propagate connection info to Blimp android UI. (Closed)
Patch Set: Merge conflicts. Created 4 years, 3 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/core/blimp_client_context_impl.h
diff --git a/blimp/client/core/blimp_client_context_impl.h b/blimp/client/core/blimp_client_context_impl.h
index 2f8a270789bc225c8b97d4aab43b07120aec0585..d2053ece2a87afa2dc6c661c8a0fe9efda0d35a4 100644
--- a/blimp/client/core/blimp_client_context_impl.h
+++ b/blimp/client/core/blimp_client_context_impl.h
@@ -15,8 +15,9 @@
#include "base/threading/thread.h"
#include "blimp/client/core/compositor/blob_image_serialization_processor.h"
#include "blimp/client/core/session/client_network_components.h"
+#include "blimp/client/core/session/connection_status.h"
#include "blimp/client/core/session/identity_source.h"
-#include "blimp/client/core/session/network_event_observer.h"
+#include "blimp/client/core/settings/blimp_settings_delegate.h"
#include "blimp/client/public/blimp_client_context.h"
#include "blimp/client/public/contents/blimp_contents.h"
#include "blimp/client/public/session/assignment.h"
@@ -41,8 +42,8 @@ class TabControlFeature;
// the blimp client.
class BlimpClientContextImpl
: public BlimpClientContext,
- public BlobImageSerializationProcessor::ErrorDelegate,
- public NetworkEventObserver {
+ public BlimpSettingsDelegate,
+ public BlobImageSerializationProcessor::ErrorDelegate {
public:
// The |io_thread_task_runner| must be the task runner to use for IO
// operations.
@@ -61,16 +62,14 @@ class BlimpClientContextImpl
void Connect() override;
void ConnectWithAssignment(const Assignment& assignment) override;
- // NetworkEventObserver implementation.
- void OnConnected() override;
- void OnDisconnected(int result) override;
-
protected:
// Returns the URL to use for connections to the assigner. Used to construct
// the AssignmentSource.
virtual GURL GetAssignerURL();
- IdentitySource* GetIdentitySource();
+ // BlimpSettingsDelegate implementation.
+ IdentitySource* GetIdentitySource() override;
+ ConnectionStatus* GetConnectionStatus() override;
private:
// Called when an OAuth2 token is received. Will then ask the
@@ -128,6 +127,9 @@ class BlimpClientContextImpl
// Provide OAuth2 token and propagate account sign in states change.
std::unique_ptr<IdentitySource> identity_source_;
+ // Connection status to the engine.
+ ConnectionStatus connection_status_;
+
base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl);

Powered by Google App Engine
This is Rietveld 408576698